Bring enum implementation up to date with its spec

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 5.0
    • Affects Version/s: 1.4.0
    • Component/s: tools
    • b46
    • generic
    • generic

      Attached to the CCC proposal corresponding to this bug report is the latest JSR-201 spec draft for enum types (labeled "Preliminary Proposed Final Draft 2"). There are three substantive changes in this draft:

      (1) All enum constructors are implicitly private. The compiler should implement this behavior.

      (2) The use of the abstract and final modifiers on enum types is prohibited. The compiler should generate a compile-time error if a program uses either of these modifiers on an enum-type.

      (3) It is illegal to reflectively instantiate an enum type.
      Constructor.newInstance() will need new checks. (Class.newInstance() should then behave properly as it is implemented in terms of Constructor.newInstance().)

            Assignee:
            Joe Darcy
            Reporter:
            Josh Bloch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: