7179305: (fs) Method name sun.nio.fs.UnixPath.getPathForExecptionMessage is misspelled

Reviewed-by: dholmes, chegar
This commit is contained in:
Rob McKenna 2012-07-09 22:26:08 +01:00
parent e83a16fa42
commit 95af7bf142
9 changed files with 41 additions and 41 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -55,7 +55,7 @@ class LinuxUserDefinedFileAttributeView
name = USER_NAMESPACE + name; name = USER_NAMESPACE + name;
byte[] bytes = name.getBytes(); byte[] bytes = name.getBytes();
if (bytes.length > XATTR_NAME_MAX) { if (bytes.length > XATTR_NAME_MAX) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "'" + name + "' is too big"); null, "'" + name + "' is too big");
} }
return bytes; return bytes;
@ -116,7 +116,7 @@ class LinuxUserDefinedFileAttributeView
buffer = NativeBuffers.getNativeBuffer(size); buffer = NativeBuffers.getNativeBuffer(size);
continue; continue;
} }
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Unable to get list of extended attributes: " + null, "Unable to get list of extended attributes: " +
x.getMessage()); x.getMessage());
} }
@ -138,7 +138,7 @@ class LinuxUserDefinedFileAttributeView
// fgetxattr returns size if called with size==0 // fgetxattr returns size if called with size==0
return fgetxattr(fd, nameAsBytes(file,name), 0L, 0); return fgetxattr(fd, nameAsBytes(file,name), 0L, 0);
} catch (UnixException x) { } catch (UnixException x) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Unable to get size of extended attribute '" + name + null, "Unable to get size of extended attribute '" + name +
"': " + x.getMessage()); "': " + x.getMessage());
} finally { } finally {
@ -191,7 +191,7 @@ class LinuxUserDefinedFileAttributeView
} catch (UnixException x) { } catch (UnixException x) {
String msg = (x.errno() == ERANGE) ? String msg = (x.errno() == ERANGE) ?
"Insufficient space in buffer" : x.getMessage(); "Insufficient space in buffer" : x.getMessage();
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Error reading extended attribute '" + name + "': " + msg); null, "Error reading extended attribute '" + name + "': " + msg);
} finally { } finally {
close(fd); close(fd);
@ -243,7 +243,7 @@ class LinuxUserDefinedFileAttributeView
src.position(pos + rem); src.position(pos + rem);
return rem; return rem;
} catch (UnixException x) { } catch (UnixException x) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Error writing extended attribute '" + name + "': " + null, "Error writing extended attribute '" + name + "': " +
x.getMessage()); x.getMessage());
} finally { } finally {
@ -264,7 +264,7 @@ class LinuxUserDefinedFileAttributeView
try { try {
fremovexattr(fd, nameAsBytes(file,name)); fremovexattr(fd, nameAsBytes(file,name));
} catch (UnixException x) { } catch (UnixException x) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Unable to delete extended attribute '" + name + "': " + x.getMessage()); null, "Unable to delete extended attribute '" + name + "': " + x.getMessage());
} finally { } finally {
close(fd); close(fd);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -246,7 +246,7 @@ class LinuxWatchService
return x.asIOException(dir); return x.asIOException(dir);
} }
if (!attrs.isDirectory()) { if (!attrs.isDirectory()) {
return new NotDirectoryException(dir.getPathForExecptionMessage()); return new NotDirectoryException(dir.getPathForExceptionMessage());
} }
// register with inotify (replaces existing mask if already registered) // register with inotify (replaces existing mask if already registered)

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -324,7 +324,7 @@ class SolarisAclFileAttributeView
return decode(address, n); return decode(address, n);
} catch (UnixException x) { } catch (UnixException x) {
if ((x.errno() == ENOSYS) || !isAclsEnabled(fd)) { if ((x.errno() == ENOSYS) || !isAclsEnabled(fd)) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, x.getMessage() + " (file system does not support NFSv4 ACLs)"); null, x.getMessage() + " (file system does not support NFSv4 ACLs)");
} }
x.rethrowAsIOException(file); x.rethrowAsIOException(file);
@ -355,7 +355,7 @@ class SolarisAclFileAttributeView
facl(fd, ACE_SETACL, n, address); facl(fd, ACE_SETACL, n, address);
} catch (UnixException x) { } catch (UnixException x) {
if ((x.errno() == ENOSYS) || !isAclsEnabled(fd)) { if ((x.errno() == ENOSYS) || !isAclsEnabled(fd)) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, x.getMessage() + " (file system does not support NFSv4 ACLs)"); null, x.getMessage() + " (file system does not support NFSv4 ACLs)");
} }
if (x.errno() == EINVAL && (n < 3)) if (x.errno() == EINVAL && (n < 3))

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -49,7 +49,7 @@ class SolarisUserDefinedFileAttributeView
if (bytes.length <= 1 || if (bytes.length <= 1 ||
(bytes.length == 2 && bytes[1] == '.')) (bytes.length == 2 && bytes[1] == '.'))
{ {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "'" + name + "' is not a valid name"); null, "'" + name + "' is not a valid name");
} }
} }
@ -96,7 +96,7 @@ class SolarisUserDefinedFileAttributeView
} }
return Collections.unmodifiableList(list); return Collections.unmodifiableList(list);
} catch (UnixException x) { } catch (UnixException x) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Unable to get list of extended attributes: " + null, "Unable to get list of extended attributes: " +
x.getMessage()); x.getMessage());
} }
@ -126,7 +126,7 @@ class SolarisUserDefinedFileAttributeView
close(afd); close(afd);
} }
} catch (UnixException x) { } catch (UnixException x) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Unable to get size of extended attribute '" + name + null, "Unable to get size of extended attribute '" + name +
"': " + x.getMessage()); "': " + x.getMessage());
} }
@ -165,7 +165,7 @@ class SolarisUserDefinedFileAttributeView
fc.close(); fc.close();
} }
} catch (UnixException x) { } catch (UnixException x) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Unable to read extended attribute '" + name + null, "Unable to read extended attribute '" + name +
"': " + x.getMessage()); "': " + x.getMessage());
} }
@ -201,7 +201,7 @@ class SolarisUserDefinedFileAttributeView
fc.close(); fc.close();
} }
} catch (UnixException x) { } catch (UnixException x) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Unable to write extended attribute '" + name + null, "Unable to write extended attribute '" + name +
"': " + x.getMessage()); "': " + x.getMessage());
} }
@ -224,7 +224,7 @@ class SolarisUserDefinedFileAttributeView
close(dfd); close(dfd);
} }
} catch (UnixException x) { } catch (UnixException x) {
throw new FileSystemException(file.getPathForExecptionMessage(), throw new FileSystemException(file.getPathForExceptionMessage(),
null, "Unable to delete extended attribute '" + name + null, "Unable to delete extended attribute '" + name +
"': " + x.getMessage()); "': " + x.getMessage());
} finally { } finally {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -288,7 +288,7 @@ class SolarisWatchService
return x.asIOException(dir); return x.asIOException(dir);
} }
if (!attrs.isDirectory()) { if (!attrs.isDirectory()) {
return new NotDirectoryException(dir.getPathForExecptionMessage()); return new NotDirectoryException(dir.getPathForExceptionMessage());
} }
// return existing watch key after updating events if already // return existing watch key after updating events if already

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -383,8 +383,8 @@ class UnixCopyFile {
} catch (UnixException x) { } catch (UnixException x) {
if (x.errno() == EXDEV) { if (x.errno() == EXDEV) {
throw new AtomicMoveNotSupportedException( throw new AtomicMoveNotSupportedException(
source.getPathForExecptionMessage(), source.getPathForExceptionMessage(),
target.getPathForExecptionMessage(), target.getPathForExceptionMessage(),
x.errorString()); x.errorString());
} }
x.rethrowAsIOException(source, target); x.rethrowAsIOException(source, target);
@ -420,7 +420,7 @@ class UnixCopyFile {
return; // nothing to do as files are identical return; // nothing to do as files are identical
if (!flags.replaceExisting) { if (!flags.replaceExisting) {
throw new FileAlreadyExistsException( throw new FileAlreadyExistsException(
target.getPathForExecptionMessage()); target.getPathForExceptionMessage());
} }
// attempt to delete target // attempt to delete target
@ -436,7 +436,7 @@ class UnixCopyFile {
(x.errno() == EEXIST || x.errno() == ENOTEMPTY)) (x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{ {
throw new DirectoryNotEmptyException( throw new DirectoryNotEmptyException(
target.getPathForExecptionMessage()); target.getPathForExceptionMessage());
} }
x.rethrowAsIOException(target); x.rethrowAsIOException(target);
} }
@ -489,7 +489,7 @@ class UnixCopyFile {
(x.errno() == EEXIST || x.errno() == ENOTEMPTY)) (x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{ {
throw new DirectoryNotEmptyException( throw new DirectoryNotEmptyException(
source.getPathForExecptionMessage()); source.getPathForExceptionMessage());
} }
x.rethrowAsIOException(source); x.rethrowAsIOException(source);
} }
@ -542,7 +542,7 @@ class UnixCopyFile {
return; // nothing to do as files are identical return; // nothing to do as files are identical
if (!flags.replaceExisting) if (!flags.replaceExisting)
throw new FileAlreadyExistsException( throw new FileAlreadyExistsException(
target.getPathForExecptionMessage()); target.getPathForExceptionMessage());
try { try {
if (targetAttrs.isDirectory()) { if (targetAttrs.isDirectory()) {
rmdir(target); rmdir(target);
@ -555,7 +555,7 @@ class UnixCopyFile {
(x.errno() == EEXIST || x.errno() == ENOTEMPTY)) (x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{ {
throw new DirectoryNotEmptyException( throw new DirectoryNotEmptyException(
target.getPathForExecptionMessage()); target.getPathForExceptionMessage());
} }
x.rethrowAsIOException(target); x.rethrowAsIOException(target);
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -97,8 +97,8 @@ class UnixException extends Exception {
} }
void rethrowAsIOException(UnixPath file, UnixPath other) throws IOException { void rethrowAsIOException(UnixPath file, UnixPath other) throws IOException {
String a = (file == null) ? null : file.getPathForExecptionMessage(); String a = (file == null) ? null : file.getPathForExceptionMessage();
String b = (other == null) ? null : other.getPathForExecptionMessage(); String b = (other == null) ? null : other.getPathForExceptionMessage();
IOException x = translateToIOException(a, b); IOException x = translateToIOException(a, b);
throw x; throw x;
} }
@ -108,6 +108,6 @@ class UnixException extends Exception {
} }
IOException asIOException(UnixPath file) { IOException asIOException(UnixPath file) {
return translateToIOException(file.getPathForExecptionMessage(), null); return translateToIOException(file.getPathForExceptionMessage(), null);
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -238,7 +238,7 @@ public abstract class UnixFileSystemProvider
// DirectoryNotEmptyException if not empty // DirectoryNotEmptyException if not empty
if (attrs != null && attrs.isDirectory() && if (attrs != null && attrs.isDirectory() &&
(x.errno() == EEXIST || x.errno() == ENOTEMPTY)) (x.errno() == EEXIST || x.errno() == ENOTEMPTY))
throw new DirectoryNotEmptyException(file.getPathForExecptionMessage()); throw new DirectoryNotEmptyException(file.getPathForExceptionMessage());
x.rethrowAsIOException(file); x.rethrowAsIOException(file);
return false; return false;
@ -401,7 +401,7 @@ public abstract class UnixFileSystemProvider
return new UnixDirectoryStream(dir, ptr, filter); return new UnixDirectoryStream(dir, ptr, filter);
} catch (UnixException x) { } catch (UnixException x) {
if (x.errno() == ENOTDIR) if (x.errno() == ENOTDIR)
throw new NotDirectoryException(dir.getPathForExecptionMessage()); throw new NotDirectoryException(dir.getPathForExceptionMessage());
x.rethrowAsIOException(dir); x.rethrowAsIOException(dir);
} }
} }
@ -421,7 +421,7 @@ public abstract class UnixFileSystemProvider
if (dfd2 != -1) if (dfd2 != -1)
UnixNativeDispatcher.close(dfd2); UnixNativeDispatcher.close(dfd2);
if (x.errno() == UnixConstants.ENOTDIR) if (x.errno() == UnixConstants.ENOTDIR)
throw new NotDirectoryException(dir.getPathForExecptionMessage()); throw new NotDirectoryException(dir.getPathForExceptionMessage());
x.rethrowAsIOException(dir); x.rethrowAsIOException(dir);
} }
return new UnixSecureDirectoryStream(dir, dp, dfd2, filter); return new UnixSecureDirectoryStream(dir, dp, dfd2, filter);
@ -490,7 +490,7 @@ public abstract class UnixFileSystemProvider
return new UnixPath(link.getFileSystem(), target); return new UnixPath(link.getFileSystem(), target);
} catch (UnixException x) { } catch (UnixException x) {
if (x.errno() == UnixConstants.EINVAL) if (x.errno() == UnixConstants.EINVAL)
throw new NotLinkException(link.getPathForExecptionMessage()); throw new NotLinkException(link.getPathForExceptionMessage());
x.rethrowAsIOException(link); x.rethrowAsIOException(link);
return null; // keep compiler happy return null; // keep compiler happy
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -179,7 +179,7 @@ class UnixPath
} }
// use this message when throwing exceptions // use this message when throwing exceptions
String getPathForExecptionMessage() { String getPathForExceptionMessage() {
return toString(); return toString();
} }
@ -780,7 +780,7 @@ class UnixPath
x.setError(ELOOP); x.setError(ELOOP);
if (x.errno() == ELOOP) if (x.errno() == ELOOP)
throw new FileSystemException(getPathForExecptionMessage(), null, throw new FileSystemException(getPathForExceptionMessage(), null,
x.getMessage() + " or unable to access attributes of symbolic link"); x.getMessage() + " or unable to access attributes of symbolic link");
x.rethrowAsIOException(this); x.rethrowAsIOException(this);