Bug 211054 - [javadoc] @see package reference should raise a warning except for the package declaration
Summary: [javadoc] @see package reference should raise a warning except for the packag...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-27 07:49 EST by Frederic Fusier CLA
Modified: 2009-08-17 11:47 EDT (History)
3 users (show)

See Also:


Attachments
[proposed patch + test case] on top v_872 (7.30 KB, patch)
2008-06-05 07:48 EDT, Eric Jodet CLA
no flags Details | Diff
[proposed patch + test cases] on top v_872 (7.80 KB, patch)
2008-06-05 09:46 EDT, Eric Jodet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2007-11-27 07:49:18 EST
Consider the following test case:
package pack;
public class Test {
  /**
   * @see java
   * @see java.lang
   */
  public void foo() {}
}

Generate this test case with Javadoc tool, produces 2 warnings:
Generating D:\workspace\doc\pack\Test.html...
D:\workspace\src\pack\Test.java:8: warning - Tag @see: reference not found: java
D:\workspace\src\pack\Test.java:8: warning - Tag @see: reference not found: java.lang

JDT compiler does not raise any warning, even while processing Javadoc comments and reporting invalid references in tag.

Open this bug on version 3.0 as this behavior difference with Javadoc tool is the direct consequence of fix for bug 50695 which has been released in 3.0M7!

Note that bug 50695 was fixed upon Javadoc tool 1.4 "specification": http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#@see
(see table Typical forms for @see package.class#member)

But it seems that the last syntax of this table "@see  package" is only valid for the package declaration. All other package references produce a warning during the Javadoc tool generation.

So, following syntax should still be accepted:
package pack;
public class Test {
  /**
   * @see pack
   */
  public void foo() {}
}
Comment 1 Eric Jodet CLA 2008-06-05 07:48:48 EDT
Created attachment 103720 [details]
[proposed patch + test case] on top v_872
Comment 2 Eric Jodet CLA 2008-06-05 07:53:08 EDT
Note that Fix for bug 50695 intended to disable validation for packages references, so that no warning should be raised.
With the fix for this bug comes a new behavior, where only references to package declaration will be accepted. Hence, test cases corresponding to bug 50695 had to be modified in the attached patch.
Comment 3 Eric Jodet CLA 2008-06-05 09:46:46 EDT
Created attachment 103733 [details]
[proposed patch + test cases] on top v_872

better patch (thanks frederic) and new test case
Comment 4 Frederic Fusier CLA 2008-09-12 12:40:09 EDT
Released for 3.5M2
Comment 5 David Audel CLA 2008-09-15 07:25:51 EDT
Verified for 3.5M2 using I20080914-2000
Comment 6 Mark A. Ziesemer CLA 2009-08-17 11:47:22 EDT
Please see bug 281609.  Technically, this was an invalid effort and needs to be reverted.  See bug 281609 comment #6 for specifics.