--- a/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java Thu Mar 31 22:07:32 2011 -0700
+++ b/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java Mon Apr 04 18:09:53 2011 +0100
@@ -105,20 +105,6 @@
return (UnixPath)obj;
}
- boolean followLinks(LinkOption... options) {
- boolean followLinks = true;
- for (LinkOption option: options) {
- if (option == LinkOption.NOFOLLOW_LINKS) {
- followLinks = false;
- continue;
- }
- if (option == null)
- throw new NullPointerException();
- throw new AssertionError("Should not get here");
- }
- return followLinks;
- }
-
@Override
@SuppressWarnings("unchecked")
public <V extends FileAttributeView> V getFileAttributeView(Path obj,
@@ -126,7 +112,7 @@
LinkOption... options)
{
UnixPath file = UnixPath.toUnixPath(obj);
- boolean followLinks = followLinks(options);
+ boolean followLinks = Util.followLinks(options);
if (type == BasicFileAttributeView.class)
return (V) UnixFileAttributeViews.createBasicView(file, followLinks);
if (type == PosixFileAttributeView.class)
@@ -163,7 +149,7 @@
LinkOption... options)
{
UnixPath file = UnixPath.toUnixPath(obj);
- boolean followLinks = followLinks(options);
+ boolean followLinks = Util.followLinks(options);
if (name.equals("basic"))
return UnixFileAttributeViews.createBasicView(file, followLinks);
if (name.equals("posix"))