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

langtools/tools/javac/T8152616.java missing @modules

XMLWordPrintable

    • b15

        langtools/tools/javac/T8152616.java is missing @modules to declare the non-exported packages that the test makes use of. This is problem when the test is run with --illegal-access=deny, it only works now because these packages are opened for illegal access. The test should be updated to use @modules:

        diff --git a/test/langtools/tools/javac/T8152616.java b/test/langtools/tools/javac/T8152616.java
        --- a/test/langtools/tools/javac/T8152616.java
        +++ b/test/langtools/tools/javac/T8152616.java
        @@ -25,7 +25,8 @@
          * @test
          * @bug 8152616
          * @summary Unit test for corner case of PrettyPrinting when SourceOutput is false
        - * @run compile --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED T8152616.java
        + * @modules jdk.compiler/com.sun.tools.javac.api
        + jdk.compiler/com.sun.tools.javac.tree
          * @run main T8152616
          */

              vromero Vicente Arturo Romero Zaldivar
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: