Bug 211054

Summary: [javadoc] @see package reference should raise a warning except for the package declaration
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bugs, david_audel, philippe_mulet
Version: 3.0   
Target Milestone: 3.5 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
[proposed patch + test case] on top v_872
none
[proposed patch + test cases] on top v_872 none

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.