Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8243057

compilation of annotated static record fields fails with NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 16
    • 14.0.1
    • tools
    • b08

      Testing records on the JavaFX source, I created this branch on GitHub: https://github.com/nlisker/jfx/tree/Records

      Running `./gradlew` to build throws the compilation exception:

      An exception has occurred in the compiler (14). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
      java.lang.NullPointerException
              at jdk.compiler/com.sun.tools.javac.comp.Check.validateAnnotation(Check.java:2912)
              at jdk.compiler/com.sun.tools.javac.comp.Check.validateAnnotations(Check.java:2868)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.lambda$annotateLater$1(Annotate.java:279)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:200)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.unblockAnnotations(Annotate.java:144)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:157)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterDone(JavaCompiler.java:1752)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1073)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:936)
              at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:316)
              at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
              at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
              at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)

      Attached the .args file.

      I suspect that the issue has to do with the @NamedArg annotations on the record components, such as in the javafx/scene/web/PopupFeatures.java class.

            vromero Vicente Arturo Romero Zaldivar
            nlisker Nir Lisker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: