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

incorrect message from javac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • tools
    • b154
    • Verified

        having the following directory / file structure:

        myTests/play/weak/modules/
        myTests/play/weak/src/wm1
        myTests/play/weak/src/wm2

        cat myTests/play/weak/src/wm1/module-info.java
        module wm1 {}

        cat myTests/play/weak/src/wm2/module-info.java
        module wm2 {}

        when executing the command:

        javac -d myTests/play/weak/modules --module-source-path myTests/play/weak/ myTests/play/weak/src/wm1/module-info.java
        javac fails with the following error:

        An exception has occurred in the compiler (9-internal). 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 and the following diagnostic in your report. Thank you.
        java.lang.NullPointerException
        at jdk.compiler/com.sun.tools.javac.file.Locations$OutputLocationHandler.getLocationForModule(Locations.java:556)
        at jdk.compiler/com.sun.tools.javac.file.Locations.getLocationForModule(Locations.java:1664)
        at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getLocationForModule(JavacFileManager.java:996)
        at jdk.compiler/com.sun.tools.javac.comp.Modules.getModuleLocation(Modules.java:482)
        at jdk.compiler/com.sun.tools.javac.comp.Modules.getModuleLocation(Modules.java:462)
        at jdk.compiler/com.sun.tools.javac.comp.Modules.setCompilationUnitModules(Modules.java:366)
        at jdk.compiler/com.sun.tools.javac.comp.Modules.enter(Modules.java:265)
        at jdk.compiler/com.sun.tools.javac.comp.Modules.initModules(Modules.java:231)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.initModules(JavaCompiler.java:1043)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:937)
        at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:307)
        at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:160)
        at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:55)
        at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:41)

        javac -d myTests/play/weak/modules --module-source-path myTests/play/weak/src/ myTests/play/weak/src/wm1/module-info.java, issues a warning

              vromero Vicente Arturo Romero Zaldivar
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: