United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6287639 Abstract methods in enum classes should not be listed as abstract
JDK-6287639 : Abstract methods in enum classes should not be listed as abstract

Details
Type:
Bug
Submit Date:
2005-06-17
Status:
Open
Updated Date:
2010-05-08
Project Name:
JDK
Resolved Date:
Component:
docs
OS:
generic
Sub-Component:
doclet
CPU:
generic
Priority:
P3
Resolution:
Unresolved
Affected Versions:
6
Targeted Versions:

Related Reports
Relates:
Relates:

Sub Tasks

Description
One way to implement enum-constant specific behavior is to have the enum class declare an abstract method and then to have each specialized enum constant override the class (specialized enum constants are implemented as anonymous subclasses of the enum class).  Although the method is declared abstract in the enum, it is effectively not abstract since javac ensures that each enum constant provides a concrete implementation of the method.  Therefore, in this situation the generated javadoc should not list the "abstract" modifier on the method.

###@###.### 2005-06-17 23:29:29 GMT

                                    

Comments
EVALUATION

###@###.###:

This is an issue for the doclet.  We should verify (perhaps Joe has
given this more thought) that the "abstract" is truly not part of the
specification, that it isn't checked by the JCK, etc.  Doing this would
be a bigger step than eliding optional "noise" keywords like the "public"
on an interface member.  It's closer in scope to what we do in 
StringBuffer and StringBuilder to hide all reference to the 
AbstractStringBuilder methods.

###@###.###:
I asked Joe about this, and he's convinced me that it's the right
thing to do.

(pasted by Doug from email)
###@###.### 2005-07-19 17:20:44 GMT
                                     
2005-07-19



Hardware and Software, Engineered to Work Together