Bug 45669

Summary: @see reference put between other tags declaration should be valid
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Frederic Fusier CLA 2003-10-28 10:27:40 EST
Compiler report warning for following javadoc comment:
public class X {
	/**
	 * 
	 * @param str1
	 * 		  @see String
	 * @param str2
	 */
	void foo (String str1, String str2) {}
}

The second @param tag is wrongly warned as an unexpected javadoc entry and str2 
in argument method declaration is warned as missing a javadoc entry!

This is not useful as the javadoc comment looks pretty good.
Compiler should accept that @see tags are put between other valid tags as 
@param, @return, @throws and @exception.
Comment 1 Frederic Fusier CLA 2003-10-31 11:21:43 EST
Due to initial implementation of the annotation parser: we have first supposed 
that tags should be declared in a specific order recommended by Javadoc:
 - @param
 - @throws
 - @see

Fixed by making the annotation parser accept that @see tags were put between 
other tags declaration.

For example, now following Javadoc comment will be accepted by the compiler:
/**
 * @param x
 * @see String
 * @param y
 * @see Object
 * @throws NullPointerException
 * @see Exception
 * @return
 * @see "String reference"
 */

Note that the only restriction which remains now about tags order is that 
@throws (or @exception) tags should be declared after all the @param tags.

Test cases 'testBug45669' and 'testBug45669a' have been added to 
AnnotationTestMixed.
Comment 2 David Audel CLA 2003-11-20 13:09:02 EST
Verified.