|
Quick Lists
|
|
Bug ID:
|
4682448
|
|
Votes
|
0
|
|
Synopsis
|
Interface methods are marked public which is always implied & discouraged by JLS
|
|
Category
|
doclet:tbd
|
|
Reported Against
|
1.4
|
|
Release Fixed
|
1.5(tiger-b30)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
|
|
Submit Date
|
09-MAY-2002
|
|
Description
|
Fixed for interface fields and methods.
xxxxx@xxxxx 2003-11-15
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
Javadoc marks interface methods with the public access
modifiers, which is always implied for interfaces. The
JLS "strongly discourages" this style.
see:
http://java.sun.com/docs/books/jls/second_edition/html/interfaces.doc.html#78651
"Every method declaration in the body of an interface is implicitly public.
It is permitted, but strongly discouraged as a matter of style, to redundantly specify the public modifier for interface methods."
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Look at the JavaDoc for java.util.List for example
This bug can be reproduced always.
(Review ID: 146008)
======================================================================
|
|
Work Around
|
N/A
|
|
Evaluation
|
Javadoc's philosophy is to show both explicit and implicit modifiers
in the signature, despite the JLS convention. To hide the "public" modifier
from interface methods would be counter to this philosophy.
xxxxx@xxxxx 2002-11-24
xxxxx@xxxxx wrote:
Yes, I think it is fine for this to appear in the javadoc.
xxxxx@xxxxx 2002-11-24
>Would you agree that although the JLS suggests not explicitly writing "public"
>in the declaration of interface declarations, that it's fine for javadoc
>to do so?
xxxxx@xxxxx replied:
No.
Re-opening to get a concensus. Notice that since 1.2, "abstract" has not
been displayed, due to:
4096581: interface methods should not be mark 'abstract'
xxxxx@xxxxx 2002-11-25
xxxxx@xxxxx wrote:
I think it's unnecessary to display the public modifier under these
circumstances. "When in doubt, leave it out."
So let's leave out the "public" modifier.
xxxxx@xxxxx 2003-09-30
Fixed. The public modifier is now omitted for interface fields and methods.
xxxxx@xxxxx 2003-11-15
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |