mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
7179305: (fs) Method name sun.nio.fs.UnixPath.getPathForExecptionMessage is misspelled
Reviewed-by: dholmes, chegar
This commit is contained in:
parent
e83a16fa42
commit
95af7bf142
9 changed files with 41 additions and 41 deletions
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -55,7 +55,7 @@ class LinuxUserDefinedFileAttributeView
|
|||
name = USER_NAMESPACE + name;
|
||||
byte[] bytes = name.getBytes();
|
||||
if (bytes.length > XATTR_NAME_MAX) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "'" + name + "' is too big");
|
||||
}
|
||||
return bytes;
|
||||
|
@ -116,7 +116,7 @@ class LinuxUserDefinedFileAttributeView
|
|||
buffer = NativeBuffers.getNativeBuffer(size);
|
||||
continue;
|
||||
}
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Unable to get list of extended attributes: " +
|
||||
x.getMessage());
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ class LinuxUserDefinedFileAttributeView
|
|||
// fgetxattr returns size if called with size==0
|
||||
return fgetxattr(fd, nameAsBytes(file,name), 0L, 0);
|
||||
} catch (UnixException x) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Unable to get size of extended attribute '" + name +
|
||||
"': " + x.getMessage());
|
||||
} finally {
|
||||
|
@ -191,7 +191,7 @@ class LinuxUserDefinedFileAttributeView
|
|||
} catch (UnixException x) {
|
||||
String msg = (x.errno() == ERANGE) ?
|
||||
"Insufficient space in buffer" : x.getMessage();
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Error reading extended attribute '" + name + "': " + msg);
|
||||
} finally {
|
||||
close(fd);
|
||||
|
@ -243,7 +243,7 @@ class LinuxUserDefinedFileAttributeView
|
|||
src.position(pos + rem);
|
||||
return rem;
|
||||
} catch (UnixException x) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Error writing extended attribute '" + name + "': " +
|
||||
x.getMessage());
|
||||
} finally {
|
||||
|
@ -264,7 +264,7 @@ class LinuxUserDefinedFileAttributeView
|
|||
try {
|
||||
fremovexattr(fd, nameAsBytes(file,name));
|
||||
} catch (UnixException x) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Unable to delete extended attribute '" + name + "': " + x.getMessage());
|
||||
} finally {
|
||||
close(fd);
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -246,7 +246,7 @@ class LinuxWatchService
|
|||
return x.asIOException(dir);
|
||||
}
|
||||
if (!attrs.isDirectory()) {
|
||||
return new NotDirectoryException(dir.getPathForExecptionMessage());
|
||||
return new NotDirectoryException(dir.getPathForExceptionMessage());
|
||||
}
|
||||
|
||||
// register with inotify (replaces existing mask if already registered)
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -324,7 +324,7 @@ class SolarisAclFileAttributeView
|
|||
return decode(address, n);
|
||||
} catch (UnixException x) {
|
||||
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)");
|
||||
}
|
||||
x.rethrowAsIOException(file);
|
||||
|
@ -355,7 +355,7 @@ class SolarisAclFileAttributeView
|
|||
facl(fd, ACE_SETACL, n, address);
|
||||
} catch (UnixException x) {
|
||||
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)");
|
||||
}
|
||||
if (x.errno() == EINVAL && (n < 3))
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -49,7 +49,7 @@ class SolarisUserDefinedFileAttributeView
|
|||
if (bytes.length <= 1 ||
|
||||
(bytes.length == 2 && bytes[1] == '.'))
|
||||
{
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "'" + name + "' is not a valid name");
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ class SolarisUserDefinedFileAttributeView
|
|||
}
|
||||
return Collections.unmodifiableList(list);
|
||||
} catch (UnixException x) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Unable to get list of extended attributes: " +
|
||||
x.getMessage());
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ class SolarisUserDefinedFileAttributeView
|
|||
close(afd);
|
||||
}
|
||||
} catch (UnixException x) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Unable to get size of extended attribute '" + name +
|
||||
"': " + x.getMessage());
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ class SolarisUserDefinedFileAttributeView
|
|||
fc.close();
|
||||
}
|
||||
} catch (UnixException x) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Unable to read extended attribute '" + name +
|
||||
"': " + x.getMessage());
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ class SolarisUserDefinedFileAttributeView
|
|||
fc.close();
|
||||
}
|
||||
} catch (UnixException x) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Unable to write extended attribute '" + name +
|
||||
"': " + x.getMessage());
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ class SolarisUserDefinedFileAttributeView
|
|||
close(dfd);
|
||||
}
|
||||
} catch (UnixException x) {
|
||||
throw new FileSystemException(file.getPathForExecptionMessage(),
|
||||
throw new FileSystemException(file.getPathForExceptionMessage(),
|
||||
null, "Unable to delete extended attribute '" + name +
|
||||
"': " + x.getMessage());
|
||||
} finally {
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -288,7 +288,7 @@ class SolarisWatchService
|
|||
return x.asIOException(dir);
|
||||
}
|
||||
if (!attrs.isDirectory()) {
|
||||
return new NotDirectoryException(dir.getPathForExecptionMessage());
|
||||
return new NotDirectoryException(dir.getPathForExceptionMessage());
|
||||
}
|
||||
|
||||
// return existing watch key after updating events if already
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -383,8 +383,8 @@ class UnixCopyFile {
|
|||
} catch (UnixException x) {
|
||||
if (x.errno() == EXDEV) {
|
||||
throw new AtomicMoveNotSupportedException(
|
||||
source.getPathForExecptionMessage(),
|
||||
target.getPathForExecptionMessage(),
|
||||
source.getPathForExceptionMessage(),
|
||||
target.getPathForExceptionMessage(),
|
||||
x.errorString());
|
||||
}
|
||||
x.rethrowAsIOException(source, target);
|
||||
|
@ -420,7 +420,7 @@ class UnixCopyFile {
|
|||
return; // nothing to do as files are identical
|
||||
if (!flags.replaceExisting) {
|
||||
throw new FileAlreadyExistsException(
|
||||
target.getPathForExecptionMessage());
|
||||
target.getPathForExceptionMessage());
|
||||
}
|
||||
|
||||
// attempt to delete target
|
||||
|
@ -436,7 +436,7 @@ class UnixCopyFile {
|
|||
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
|
||||
{
|
||||
throw new DirectoryNotEmptyException(
|
||||
target.getPathForExecptionMessage());
|
||||
target.getPathForExceptionMessage());
|
||||
}
|
||||
x.rethrowAsIOException(target);
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ class UnixCopyFile {
|
|||
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
|
||||
{
|
||||
throw new DirectoryNotEmptyException(
|
||||
source.getPathForExecptionMessage());
|
||||
source.getPathForExceptionMessage());
|
||||
}
|
||||
x.rethrowAsIOException(source);
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ class UnixCopyFile {
|
|||
return; // nothing to do as files are identical
|
||||
if (!flags.replaceExisting)
|
||||
throw new FileAlreadyExistsException(
|
||||
target.getPathForExecptionMessage());
|
||||
target.getPathForExceptionMessage());
|
||||
try {
|
||||
if (targetAttrs.isDirectory()) {
|
||||
rmdir(target);
|
||||
|
@ -555,7 +555,7 @@ class UnixCopyFile {
|
|||
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
|
||||
{
|
||||
throw new DirectoryNotEmptyException(
|
||||
target.getPathForExecptionMessage());
|
||||
target.getPathForExceptionMessage());
|
||||
}
|
||||
x.rethrowAsIOException(target);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* 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 {
|
||||
String a = (file == null) ? null : file.getPathForExecptionMessage();
|
||||
String b = (other == null) ? null : other.getPathForExecptionMessage();
|
||||
String a = (file == null) ? null : file.getPathForExceptionMessage();
|
||||
String b = (other == null) ? null : other.getPathForExceptionMessage();
|
||||
IOException x = translateToIOException(a, b);
|
||||
throw x;
|
||||
}
|
||||
|
@ -108,6 +108,6 @@ class UnixException extends Exception {
|
|||
}
|
||||
|
||||
IOException asIOException(UnixPath file) {
|
||||
return translateToIOException(file.getPathForExecptionMessage(), null);
|
||||
return translateToIOException(file.getPathForExceptionMessage(), null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* 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
|
||||
if (attrs != null && attrs.isDirectory() &&
|
||||
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
|
||||
throw new DirectoryNotEmptyException(file.getPathForExecptionMessage());
|
||||
throw new DirectoryNotEmptyException(file.getPathForExceptionMessage());
|
||||
|
||||
x.rethrowAsIOException(file);
|
||||
return false;
|
||||
|
@ -401,7 +401,7 @@ public abstract class UnixFileSystemProvider
|
|||
return new UnixDirectoryStream(dir, ptr, filter);
|
||||
} catch (UnixException x) {
|
||||
if (x.errno() == ENOTDIR)
|
||||
throw new NotDirectoryException(dir.getPathForExecptionMessage());
|
||||
throw new NotDirectoryException(dir.getPathForExceptionMessage());
|
||||
x.rethrowAsIOException(dir);
|
||||
}
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ public abstract class UnixFileSystemProvider
|
|||
if (dfd2 != -1)
|
||||
UnixNativeDispatcher.close(dfd2);
|
||||
if (x.errno() == UnixConstants.ENOTDIR)
|
||||
throw new NotDirectoryException(dir.getPathForExecptionMessage());
|
||||
throw new NotDirectoryException(dir.getPathForExceptionMessage());
|
||||
x.rethrowAsIOException(dir);
|
||||
}
|
||||
return new UnixSecureDirectoryStream(dir, dp, dfd2, filter);
|
||||
|
@ -490,7 +490,7 @@ public abstract class UnixFileSystemProvider
|
|||
return new UnixPath(link.getFileSystem(), target);
|
||||
} catch (UnixException x) {
|
||||
if (x.errno() == UnixConstants.EINVAL)
|
||||
throw new NotLinkException(link.getPathForExecptionMessage());
|
||||
throw new NotLinkException(link.getPathForExceptionMessage());
|
||||
x.rethrowAsIOException(link);
|
||||
return null; // keep compiler happy
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* 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
|
||||
String getPathForExecptionMessage() {
|
||||
String getPathForExceptionMessage() {
|
||||
return toString();
|
||||
}
|
||||
|
||||
|
@ -780,7 +780,7 @@ class UnixPath
|
|||
x.setError(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.rethrowAsIOException(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue