--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java Mon Apr 04 10:14:23 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java Mon Apr 04 19:36:26 2011 +0100
@@ -37,6 +37,7 @@
import java.nio.CharBuffer;
import java.nio.charset.CharsetDecoder;
import java.nio.file.Files;
+import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
import javax.lang.model.element.Modifier;
@@ -170,7 +171,7 @@
if (pn.equalsIgnoreCase(sn)) {
try {
// allow for Windows
- return path.toRealPath(false).getFileName().toString().equals(sn);
+ return path.toRealPath(LinkOption.NOFOLLOW_LINKS).getFileName().toString().equals(sn);
} catch (IOException e) {
}
}