|
Quick Lists
|
|
Bug ID:
|
5009574
|
|
Votes
|
0
|
|
Synopsis
|
Compiler should prohibit extending java.lang.Enum
|
|
Category
|
java:compiler
|
|
Reported Against
|
1.4
, tiger-beta
|
|
Release Fixed
|
1.5(tiger-b46)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
2-High
|
|
Related Bugs
|
5009601
,
5011080
,
5011089
|
|
Submit Date
|
08-MAR-2004
|
|
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); }
}
|
|
Work Around
|
N/A
|
|
Evaluation
|
This rule remains in the latest "preliminary proposed final draft 2"
(section III, second sentence) and so should be implemented in javac.
xxxxx@xxxxx 2004-03-08
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |