JDK 9 change to symlink handling affects SourceFile attributes

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 10
    • Affects Version/s: 9
    • Component/s: tools
    • None
    • b28

      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 where JDK-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"

            Assignee:
            Jan Lahoda
            Reporter:
            Liam Miller-Cushon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: