Community
Participate
Working Groups
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.
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.
Verified.