-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b28
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8056539 | emb-9 | Paul Govereau | P3 | Resolved | Fixed | master |
During work on JDK-8049130 for creation of golden files for negative tests, it was discovered that the error message reported for tools/javac/annotations/neg/Z3.java is not as expected.
Currently, javac reports about the missing body or abstract decl or value() method for the test. This error message can be considered a secondary error message w.r.t. the test. javac instead should also report about the usage of default and this error should be the primary error message.
Test name: tools/javac/annotations/neg/Z3.java
Test code:
enum Color { red, green, blue }
class Colored { Color value() default Color.red; }
Current error diagnostic (secondary):
compiler.err.missing.meth.body.or.decl.abstract
Expected error diagnostic (primary):
compiler.err.default.allowed.in.intf.annotation.member
Currently, javac reports about the missing body or abstract decl or value() method for the test. This error message can be considered a secondary error message w.r.t. the test. javac instead should also report about the usage of default and this error should be the primary error message.
Test name: tools/javac/annotations/neg/Z3.java
Test code:
enum Color { red, green, blue }
class Colored { Color value() default Color.red; }
Current error diagnostic (secondary):
compiler.err.missing.meth.body.or.decl.abstract
Expected error diagnostic (primary):
compiler.err.default.allowed.in.intf.annotation.member
- backported by
-
JDK-8056539 javac should report the error for default usage as the primary error
-
- Resolved
-
- relates to
-
JDK-8043283 Create .out files for negative tests in langtools regression ws
-
- Resolved
-