United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 5009574 Compiler should prohibit extending java.lang.Enum
5009574 : Compiler should prohibit extending java.lang.Enum

Details
Type:
Bug
Submit Date:
2004-03-08
Status:
Resolved
Updated Date:
2004-04-01
Project Name:
JDK
Resolved Date:
2004-04-01
Component:
tools
OS:
linux,generic
Sub-Component:
javac
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0,5.0
Fixed Versions:
5.0

Related Reports
Duplicate:
Duplicate:
Relates:

Sub Tasks

Description
The JSR-201 Public Review Draft Spec says that it is illegal for a class to extend java.lang.Enum explicitly but compiler permits it.  The following program should generate an compile-time error.  In fact it crashes the compiler:

public class Junk extends Enum {
    Junk() { super(null, 0); }
}

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta2

FIXED IN:
tiger-beta2

INTEGRATED IN:
tiger-b46
tiger-beta2


                                     
2004-06-14
PUBLIC COMMENTS

...
                                     
2004-06-10
SUGGESTED FIX

See changes in 5009601.

###@###.### 2004-03-29
                                     
2004-03-29
EVALUATION

This rule remains in the latest "preliminary proposed final draft 2"
(section III, second sentence) and so should be implemented in javac.

###@###.### 2004-03-08
                                     
2004-03-08



Hardware and Software, Engineered to Work Together