United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-5019572 Enum.compareTo() not final
JDK-5019572 : Enum.compareTo() not final

Details
Type:
Bug
Submit Date:
2004-03-24
Status:
Resolved
Updated Date:
2004-04-01
Project Name:
JDK
Resolved Date:
2004-04-01
Component:
core-libs
OS:
solaris_8
Sub-Component:
java.lang
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0 (b46)

Related Reports

Sub Tasks

Description
The enum spec requires

    java.lang.Enum.compareTo(E)

to be a final method, but it is not currently implemented as final.

                                    

Comments
EVALUATION

Agreed.

###@###.### 2004-03-24
                                     
2004-03-24
SUGGESTED FIX

src/share/classes/java/lang>sccs sccsdiff -r1.9 -r1.10 Enum.java

------- Enum.java -------
107c107
<     final public boolean equals(Object other) { 
---
>     public final boolean equals(Object other) { 
116c116
<     final public int hashCode() {
---
>     public final int hashCode() {
127c127
<     final protected Object clone() throws CloneNotSupportedException {
---
>     protected final Object clone() throws CloneNotSupportedException {
140c140
<     public int compareTo(E o) {
---
>     public final int compareTo(E o) {

###@###.### 2004-03-29
                                     
2004-03-29
PUBLIC COMMENTS

...
                                     
2004-06-10
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta2

FIXED IN:
tiger-beta2

INTEGRATED IN:
tiger-b46
tiger-beta2


                                     
2004-06-14



Hardware and Software, Engineered to Work Together