-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b154
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8174479 | 10 | Jonathan Gibbons | P3 | Resolved | Fixed | b01 |
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
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
- backported by
-
JDK-8174479 incorrect message from javac
-
- Resolved
-
- duplicates
-
JDK-8150040 Confusing error while compiling with not existing module source path
-
- Closed
-
- relates to
-
JDK-8136503 javadoc should support -Xmodule
-
- Closed
-