Community
Participate
Working Groups
I200409011200, from bug 68017: "Malformed Javadoc" warnings are rather inconsistent: (1) There's only a warning for "Missing return type description" when the @return tag is the last tag in the javadoc. (2) There's no warning for missing descriptions for @param, @exception, etc. . I would expect to get warnings everywhere or nowhere, but not only for some tags in certain positions. This example produces no warning at all: /** * @param param * @return * @throws IOException */ public int m(int param) throws IOException { throw new IOException(Integer.toString(param)); }
Ok for point 1), I'll have a fix soon. For point 2), the problem here is that compiler does not care about text after tag name, param name or references. Scan text has a cost and make it for all tags can be time consuming. Looking at spec for Javadoc (again) it's not specified that description is mandatory or should be written for @param, @see and @throws tags. So, at my point of view this point should be optional (for example: "Javadoc tag has to have a description"). As this sounds more than a requirement, I will open another bug for this point and of course change the summary of this one...
This bug is only for following issue: Compiler provides no warning for following missing description on @return tag: /** * @return * @see Object */ public int m() { }
Fixed and released in HEAD. This bug will be targeted for 3.0.2 when available and released in R3_0_maintenance stream after 3.0.1 is shipped... Now empty return tag description are properly identified even if tag is not the last one. Note that in following specific case: /** * @return * int * @see Object */ public int m() { compiler will not raise any warning as description has been correctly written... [jdt-core-internal] Changes done in JavadocReturnStatement and AbstractCommentParser classes + JavadocParser.pushText(int,int) method. Test cases added in JavadocTestMixed and ASTConverterJavadocTest.
Fixed and released in R3_0_maintenance stream. Bug Target still needs to be set to 3.0.2 when it will be available...
Setting target to 3.1 M2 while waiting for 3.0.2 one...
Verified in I200409230100.
Reopen to change statuc
Change status to Fixed Verified in I200409230100.
Finally set status as VERIFIED. We'll only change target when fix will be definitely put in R3_0_maintenance stream...
Candidating fix for 3.0.2 release (not committed yet)
Verified with M20050216