JDK-8049342 : 13.1: improve naming of anon classes for enum members
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Affected Version: 5.0,7,8
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2014-07-04
  • Updated: 2017-03-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorUnresolved
Related Reports
Relates :  
Description
The fix for JDK-8046635  highlights the fact we use standard numeric naming for the anon classes for enum members.

It would be nicer to use names involving the name of the enum member.
Comments
Should be addressed by JEP 301 (JDK-8170351), because separately-compiled use sites need to have a stable name with which to refer to enum constant types.
23-03-2017

Changed from a javac bug to a spec bug, since this requires a spec change. The request is to allow (or require?) the binary name of the anonymous class corresponding to an enum instance to include the name of the enum. Something like Weekday$MONDAY. Note that there are potential name clashes -- the Weekday enum can declare its own member class MONDAY -- so the name would probably have to include a number or additional '$' characters.
28-10-2014