JDK-4682448 : Interface methods are marked public which is always implied & discouraged by JLS
  • Type: Bug
  • Status: Resolved
  • Resolution: Fixed
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Priority: P4
  • Affected Version: 1.4.0
  • OS: windows_2000
  • CPU: x86
  • Submit Date: 2002-05-09
  • Updated Date: 2014-05-05
  • Resolved Date: 2003-11-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
5.0 b30Resolved
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
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b30 tiger-beta
2004-06-14

PUBLIC COMMENTS Fixed for interface fields and methods. ###@###.### 2003-11-15
2003-11-15

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