Bug 45669 - @see reference put between other tags declaration should be valid
Summary: @see reference put between other tags declaration should be valid
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-28 10:27 EST by Frederic Fusier CLA
Modified: 2003-11-20 13:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.