The change to symlink handling in JDK 9 also affects the path that appears in the SourceFile attribute. This is closely related to https://bugs.openjdk.java.net/browse/JDK-8178017.
It's not clear this is an issue aside from the environment whereJDK-8178017 was originally discovered, but I wanted to confirm it's OK in the general case.
$ echo 'class Hello {}' > SOURCE
$ ln -s SOURCE Hello.java
JDK 8:
javac Hello.java && javap -v Hello |& grep 'Compiled from'
Compiled from "Hello.java"
JDK 9:
javac Hello.java && javap -v Hello |& grep 'Compiled from'
Compiled from "SOURCE"
It's not clear this is an issue aside from the environment where
$ echo 'class Hello {}' > SOURCE
$ ln -s SOURCE Hello.java
JDK 8:
javac Hello.java && javap -v Hello |& grep 'Compiled from'
Compiled from "Hello.java"
JDK 9:
javac Hello.java && javap -v Hello |& grep 'Compiled from'
Compiled from "SOURCE"
- csr for
-
JDK-8182871 JDK 9 change to symlink handling affects SourceFile attributes
-
- Closed
-
- relates to
-
JDK-8214026 Canonicalized archive paths appearing in diagnostics
-
- Resolved
-
-
JDK-8178017 JDK 9 change to symlink handling causes misleading class.public.should.be.in.file diagnostic
-
- Closed
-