Bug 264415

Summary: [javadoc] Default javadoc formatter interferes with JavaDoc validation for @param comments
Product: [Eclipse Project] JDT Reporter: Wolfgang Knauf <wolfgang.knauf>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.4.1   
Target Milestone: 3.5 M2   
Hardware: PC   
OS: Windows Server 2003   
Whiteboard:

Description Wolfgang Knauf CLA 2009-02-10 15:21:04 EST
Build ID: M20080911-1700

If JavaDoc validation is configured to "Malformed Javadoc comments" => "warning/error", then it complains about the following comment:

   * @param c
   *          Length of side c, &gt; 0
   * @return Volume of the square stone = a * b * c
   * @exception InvalidParameterException
   *              If a or b or c &lt;= 0.
The message is:
"Javadoc: Description expected after this reference"

Unfortunately, the default code formatter creates this stuff when "Source"=>"Format" (Ctrl+Shift+F) is called.

Workaround: create a custom code formatter profile and uncheck "Comments" => "Javadoc comment settings" => "New line after @param tags".

I don't know what the correct solution could be. I did not find anything in the JavaDoc documentation about linebreaks between the tag and the comment, so I don't know whether the warning/error is a false positive or correct.

Another solution would be to default the "New line after @param tags" with "unchecked". But this option does not make sense at all if the resulting javadoc is always considered malformed.
Comment 1 Frederic Fusier CLA 2009-02-11 05:01:19 EST

*** This bug has been marked as a duplicate of bug 222900 ***
Comment 2 Wolfgang Knauf CLA 2009-02-11 06:19:47 EST
Closing...