This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 100777 - javadoc @link tag and unused imports
Summary: javadoc @link tag and unused imports
Status: RESOLVED DUPLICATE of bug 122484
Alias: None
Product: java
Classification: Unclassified
Component: Javadoc (show other bugs)
Version: 6.x
Hardware: Sun All
: P4 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-12 14:08 UTC by migi
Modified: 2007-12-07 16:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description migi 2007-04-12 14:08:58 UTC
The tag @link or @see in the javadoc should have import, but the annotation for
unused imports does not look at it, so basically generation of javadoc gives
warnings.

To reproduce:
1. create class and add {@link ToSomeClass} in the javadoc. Note that
ToSomeClass have to be class that is not used anywhere else, except the javadoc

2. build the javadoc, the warning will show: 
ToSomeClass.java:47: warning - Tag @see: reference not found: AnotherClass

to solve the problem, add the import for the AnotherClass in the ToSomeClass,
but than the bulb will appear that AnotherClass is not used...

The bulb should look at the tags and watch the imports for the javadoc
Comment 1 Vitezslav Stejskal 2007-04-12 21:57:26 UTC
Well, I would personally prefer to use the fully qualified name of the class in
this case. As you said the tools for static code analysis do not consider
javadoc as a valid reference to packages or classes, so adding an import for
just making the javadoc tool happy causes this import to be reported as unused.
IMO the solution is to show the hint bulb offering FQN for any unresolved
references inside javadoc.
Comment 2 migi 2007-04-13 10:39:14 UTC
Yes, you are right that the better way is to use the fully qualified name of the
class, but some solution for the users should be made. 
Maybe after Issue 37691, this problem will be gone.

In my opinion your suggestion about bulb seems to be good one.
Comment 3 Jan Pokorsky 2007-11-21 12:22:35 UTC
This should be implemented as part of the issue #122484. Use FQNs in NB 6.0.

*** This issue has been marked as a duplicate of 122484 ***