Community
Participate
Working Groups
The Java compiler warns on missing Javadoc tags for private methods. The Style preference page has a checkbox to enable this feature for public methods. So either the wording is wrong or there is a bug. Perhaps, the access level could be specified for this *great* feature, from private all the way to public with public the default. Thanks. Version 3.0.m5.
I think the options are slightly misleading indeed, there are 2 things you can do: 1- enable the Javadoc validation 2- enable the check for missing Javadoc (on public methods) I agree that the current presentation is somewhat leading to think the option (1) is further controlled by (2). Where these are rather orthogonal.
Moving to UI.
Gary, do you have a test case. I tried it with N20011201 and private methods aren't flag with an error.
Ah, I have narrowed the problem definition. You will get a warning on a private method IF that method has an "warnable" javadoc comment. I would argue that since you have two levels of settings "Javadoc" (J) AND "on public types" (J-public): (1) I should get the warnings (as below) if I only have (J) turned on and (J-public) turned OFF. I then get ALL Javadoc warnings no matter where. (2) I should NOT get the warnings (as below) if I have (J) turned ON and (J-public) turned ON. I should only get warnings on public objects. Perhaps this also argues for a more refined settings: You can get public/package/protected/private as the level to detect for. For example, in http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-commons/codec/src/java/org/apache/commons/codec/language/DoubleMetaphone.java?rev=1.15 we have the method: /** * Handles 'A', 'E', 'I', 'O', 'U', and 'Y' cases */ private int handleAEIOUY(String value, DoubleMetaphoneResult result, int index) { if (index == 0) { result.append('A'); } return index + 1; } With the warnings: Severity Description Resource In Folder Location Creation Time Javadoc: Missing tag for parameter result DoubleMetaphone.java Apache Jakarta Commons/codec/src/java/org/apache/commons/codec/language line 300 November 25, 2003 5:50:30 PM Javadoc: Missing tag for parameter value DoubleMetaphone.java Apache Jakarta Commons/codec/src/java/org/apache/commons/codec/language line 300 November 25, 2003 5:50:30 PM Javadoc: Missing tag for return type DoubleMetaphone.java Apache Jakarta Commons/codec/src/java/org/apache/commons/codec/language line 300 November 25, 2003 5:50:30 PM Javadoc: Missing tag for parameter index DoubleMetaphone.java Apache Jakarta Commons/codec/src/java/org/apache/commons/codec/language line 301 November 25, 2003 5:50:30 PM
Dirk, you must mean the N200*3*... build ;-)
There are two different issues here. The not optimal UI and a new feature request for fine grained control for Javadoc errors. I opened A separate bug for the UI issue (bug 48066). Regarding the fine grained control for Javadoc. Currently when reporting errors in Javadoc is switch on all errors in all Javadocs are reported. So if there is a wrong Javadoc for a private method it is flag as an error. More fine grained control needs support from JDT/Core.
Fixed. See bug 46854 for more details...
Verified for 3.0M6