--- old/src/share/classes/sun/nio/fs/Util.java Tue Mar 22 20:39:03 2011 +++ new/src/share/classes/sun/nio/fs/Util.java Tue Mar 22 20:39:02 2011 @@ -26,6 +26,7 @@ package sun.nio.fs; import java.util.*; +import java.nio.file.*; /** * Utility methods @@ -80,4 +81,21 @@ } return set; } + + /** + * Returns {@code true} if symbolic links should be followed + */ + static boolean followLinks(LinkOption... options) { + boolean followLinks = true; + for (LinkOption option: options) { + if (option == LinkOption.NOFOLLOW_LINKS) { + followLinks = false; + } if (option == null) { + throw new NullPointerException(); + } else { + throw new AssertionError("Should not get here"); + } + } + return followLinks; + } }