Original mailing list subject : http://markmail.org/thread/xm3hjaafyspxns7v
The "Undocumented API" rule detects private attributes as undocumented public API's when the class-level Javadoc is missing.
Here is how to reproduce this behavior :
1. Start Sonar and add the "Undocumented API" rule to the
default quality profile
2. Run "mvn sonar:sonar" on the attached project sample
3. Open Sonar. In the dashboard view of the project in the "Comments" widget, click on the percentage of documented API. It says that there is one undocumented API, which is the class Person, because it has no class-level Javadoc.
4. Go back to the dashboard view, and click on the major rules violations. There should be only the Undocumented API rule listed, and this rule says that there are 3 undocumented API's : the class itself, but also the "name" and "age" properties (see attached screenshot)
Then do the following :
1. Add a class-level Javadoc to the class Person
2. Run "mvn sonar:sonar" again
3. Open Sonar and check both the dashboard metrics and the rule violations.
4. This time, both rules say that there is no undocumented API anymore, which seems correct to me. The "name" and "age" properties are no longer detected as undocumented API by the rule.