United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4682448 Interface methods are marked public which is always implied & discouraged by JLS
JDK-4682448 : Interface methods are marked public which is always implied & discouraged by JLS

Details
Type:
Bug
Submit Date:
2002-05-09
Status:
Resolved
Updated Date:
2003-11-23
Project Name:
JDK
Resolved Date:
2003-11-23
Component:
docs
OS:
windows_2000
Sub-Component:
doclet
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
5.0 (b30)

Related Reports

Sub Tasks

Description

Name: nt126004			Date: 05/09/2002


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) 
======================================================================

                                    

Comments
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.

###@###.### 2002-11-24

###@###.### wrote:
Yes, I think it is fine for this to appear in the javadoc.

###@###.### 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?

###@###.### 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' 

###@###.### 2002-11-25

###@###.### 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.
###@###.### 2003-09-30

Fixed.  The public modifier is now omitted for interface fields and methods.
###@###.### 2003-11-15
                                     
2003-09-30
PUBLIC COMMENTS

Fixed for interface fields and methods.
###@###.### 2003-11-15
                                     
2003-11-15
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta

FIXED IN:
tiger-beta

INTEGRATED IN:
tiger-b30
tiger-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together