Community
Participate
Working Groups
Window > Preferences > Java > Code Style > Formatter Profile "Eclipse [built-in]" --> Commnets : New Line after @param tags is switched ON by default This setting conflicts with the following new compiler warning feature if enabled, which was added in 3.4M3 as per bug 73352: Window > Preferences > Java > Compiler > Javadoc Malformed Javadoc Comments: Warning Missing tag descriptions: Validate all tags This is particularly problematic when "Format Code" is enabled as "On Save" operation, since the user has no chance getting it right in this case. I think that either the default "Eclipse" profile should be changed to not add a new line after @param tags, or the "Missing tag descriptions" compiler warning should not issue a warning if the tag is there but on a new line. Actually, the second solution seems better since the javadoc tool also accepts @param arguments on a new line, so the warning is incorrect in this case.
Changed summary, previous value was: [formatter] Default "Eclipse" profile conflicts with "Javadoc tag missing argument" compiler warning for @param The point is really that the "Javadoc: Description expected after this reference" warning is invalid if the reference is there but on a new line.
Yes, I agree the warning should tolerate the new line.
*** Bug 238590 has been marked as a duplicate of this bug. ***
This bug causes valid source code to be littered with warnings when descriptions are on new lines - can this be targeted for 3.4.1 please?
*** Bug 244785 has been marked as a duplicate of this bug. ***
Can this be fixed for 3.5? If we enable to check all tags and not just @return we get many false warnings.
(In reply to comment #6) > Can this be fixed for 3.5? If we enable to check all tags and not just @return > we get many false warnings. I hope it is considered for 3.4.x, too... It's quite annoying... Mauro.
This is too late for 3.4.1. But we should have a look for 3.4.2 if it is a regression comparing to 3.3.2.
It would be great, if the fix could be scheduled for 3.4.2 As long as it is not fixed, I format the code without new lines after @param tags. But this doesn't look very pretty.
Created attachment 111453 [details] Proposed patch Instead of verifying the end of line to report the missing description warning, the Javadoc parser waits either the next tag, the closing brace of the in-line tag or the end of the comment to warn if the description hasn't been set for the previous tag...
I do not intend to backport this fix in 3.4 maintenance stream because 1) it's too big and risky 2) this cannot be considered as a regression as this problem only happens when user selects the new preference: "Missing tag description - Validate all standard tags". The workaround for 3.4.x versions will be to keep using the default preference for this warning: "Missing tag description - Validate @return tag".
Released for 3.5M2
Verified for 3.5M2 using I20080914-2000
*** Bug 251160 has been marked as a duplicate of this bug. ***
*** Bug 252088 has been marked as a duplicate of this bug. ***
*** Bug 264415 has been marked as a duplicate of this bug. ***