-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
low
-
Programs parsing the output may need to be updated.
-
Java API
-
Implementation
Summary
Change the string output for annotations so that enum constants have their name
method rather than their toString
method called. Also, switch from using binary names to canonical names for class and interface names.
Problem
Using an enum constant's toString
output isn't necessary the source-usable textual representation of the constant. For class and interface names, canonical names rather than binary names are used in source.
Solution
Change the implementation as summarized above. This also matches 'javac`'s behavior in the analagous cases.
Specification
No specification changes; the exact textual output is not specified, by design.
- csr of
-
JDK-8281462 Annotation toString output for enum not reusable for source input
-
- Closed
-