Bug 264415 - [javadoc] Default javadoc formatter interferes with JavaDoc validation for @param comments
Summary: [javadoc] Default javadoc formatter interferes with JavaDoc validation for @p...
Status: CLOSED DUPLICATE of bug 222900
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows Server 2003
: P3 normal (vote)
Target Milestone: 3.5 M2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-10 15:21 EST by Wolfgang Knauf CLA
Modified: 2009-02-11 06:43 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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, > 0
   * @return Volume of the square stone = a * b * c
   * @exception InvalidParameterException
   *              If a or b or c <= 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...