Community
Participate
Working Groups
Build ID: M20060921-0945 Steps To Reproduce: 1. Enable all Javadoc warnings. 2. Write a method that only returns some value. 3. Observe that you get a warning about that there's no javadoc for the method. 4. Auto-create javadoc for that method. This should give you a javadoc comment with only an empty return tag in it. 5. Note how you don't get any warnings any more, even though you still haven't documented anything. More information: Example: /** * @return */ int fluff() { return 7; } I want a warning saying that the @return tag doesn't have any contents. Or to be more generic, this warning should trigger on any tag that doesn't have any contents. Possibly only once per javadoc block, saying "Comment has empty javadoc tags." I want another warning that there's no general description of the method. The two kinds of warnings should be possible to enable / disable individually. Right now it's easy to forget to write javadoc since just generating default comments will rid you of all warnings. I have just taken over a piece of undocumented code where I would have liked to be notified about all empty comments (there are lots...).
I did not manage to recreate the problem. With the Javadoc warnings enabled, the @return tag is flagged with a warning (missing return type). May you please check that the Javadoc warnings are correctly enabled? May be these settings are overridden at the project level (disabled) which would cause the @return tag to remain unflagged. Thanks.
Indeed, I should have tried the example before I filed this :-(, the @return tag seems to be treated differently from some other tags. But my complaint is valid for parameters though: /** * @param hej * @return fluff */ int fluff(int hej) { return hej + 7; } In this example (that I actually tested...) I get no warning that "hej" is undocumented. Neither do I get any warning that there's no description of what the method is doing (should be before the "@param hej" line).
All these points should be addressed by bug #73552. Please follow-up this one. *** This bug has been marked as a duplicate of bug 73552 ***
wrong bug number
*** This bug has been marked as a duplicate of bug 73352 ***