-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b156
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8174522 | 10 | Srikanth Adayapalam | P3 | Resolved | Fixed | b01 |
From Stephen Colebourne:
When trying to compile a module-info.java file, "weak" is rejected (I
assume not implemented yet). But, this is a report about the error
handling, which fails to recognise that this is a module-info file,
and thus outputs messages about missing class/interface/enum. Some
additional processing is needed to work out that the user was trying
to declare a module and got the syntax wrong:
> \apps\jdk-9-ea\bin\javac --module-source-path src -d mods src\myapp\
org\myapp\MyApp.java src\mylib\org\mylib\MyLib.java src\myapp\module-info.java s
rc\mylib\module-info.java
src\myapp\module-info.java:1: error: class, interface, or enum expected
weak module myapp {
^
src\myapp\module-info.java:3: error: class, interface, or enum expected
}
^
2 errors
Stephen
When trying to compile a module-info.java file, "weak" is rejected (I
assume not implemented yet). But, this is a report about the error
handling, which fails to recognise that this is a module-info file,
and thus outputs messages about missing class/interface/enum. Some
additional processing is needed to work out that the user was trying
to declare a module and got the syntax wrong:
> \apps\jdk-9-ea\bin\javac --module-source-path src -d mods src\myapp\
org\myapp\MyApp.java src\mylib\org\mylib\MyLib.java src\myapp\module-info.java s
rc\mylib\module-info.java
src\myapp\module-info.java:1: error: class, interface, or enum expected
weak module myapp {
^
src\myapp\module-info.java:3: error: class, interface, or enum expected
}
^
2 errors
Stephen
- backported by
-
JDK-8174522 Confusing error message when reading bad module declaration
-
- Resolved
-