Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 292233

Summary: Javadoc warnings are generated on non visible references within the same visibility
Product: [Eclipse Project] JDT Reporter: s.koning
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
Example class as described in the reproduction recipe. none

Description s.koning CLA 2009-10-14 06:41:11 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; sv-SE; rv:1.9.0.11) Gecko/2009061208 Iceweasel/3.0.9 (Debian-3.0.9-1)
Build Identifier: 20090619-0625

Checking the "Report non visible references" option of the Javadoc settings page also generates warnings on references to members with a lower visibility than what is set in "Only consider members as visible as", even if the referencing member has the same visibility as the referenced member.

This seems to be illogical: both the referenced and the referencing member have the same visibility, so if Javadoc would not be generated for one of them, the other would not be documented either, and of course vice versa.

Reproducible: Always

Steps to Reproduce:
1. Create a Java class with default visibility that contains a method with default visibility.
2. Write Javadoc for the class that contains a reference to its method.
3. Go to Window -> Preferences -> Java -> Compiler -> Javadoc
4. Set the settings for your project to process Javadoc comments, and:
 a. Malformed Javadoc commnets: Warning
 b. Only consider members as visible as: Protected
 c. Report non visible references: yes.
5. Apply. You should get a warning on the reference to the method you created.
Comment 1 s.koning CLA 2009-10-14 06:42:11 EDT
Created attachment 149510 [details]
Example class as described in the reproduction recipe.
Comment 2 Eclipse Genie CLA 2018-12-23 06:17:14 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.