Community
Participate
Working Groups
Build I20040226. Compiler does not complain on following invalid syntax in inline tag in Javadoc comment: /** * Returns the string that would be inserted at the position returned from * {@see #getCompletionOffset()} if this proposal was applied. If the * replacement string cannot be determined, <code>null</code> may be returned. * * @return the replacement string or <code>null</code> if cannot be determined */ CharSequence getCompletionText(); DOM/AST Javadoc is built correctly but compiler should warn user that wrote a wrong tag name in his javadoc comment.
Should verify what is Javadoc tool behavior in this case...
Isn't the @see tag not supposed to be in inline mode, and thus ignore from subsequent analysis ? If so, we should rather complain that the @see tag is malformed (only check reference once correctly formed).
If compiler signals a syntax error in this case, then no references will be stored for this tag => no check will be performed on this syntax...
See also bug 53075.
Fixed. Now compiler reports an 'Unexpected tag' error when {@see...} or * @link ... syntaxes are encountered. Note that in this case, we consider such tags as extra tags and just store their name and the text after even if the reference is valid... For example, this means that <code>* {@see Object}</code> will be only a tag element which name would be "@see" and has one single text element ' Object'. [jdt-core-internal] Changes made in parseComment(int,int) of AbstractCommentParser: in these cases, only parse simple tag instead of a see tag (ie. using parseSee(boolean) method) and start text fragment storage to get the rest of the tag. Test case added in JavadocTestMixed
Verified in 200405180816