I see in the code of AbstractClassCouplingCheck that java.lang are meant to be excluded:
private boolean isSignificant(String aClassName)
{
return (aClassName.length() > 0)
&& !mIgnoredClassNames.contains(aClassName)
&& !aClassName.startsWith("java.lang.");
}
However in practice they are not excluded since the class names that are checked do NOT have their full package name computed.
For example "java.lang.Class" gets counted since only "Class" is passed to isSignificant().
This is a a big issue...
I see in the code of AbstractClassCouplingCheck that java.lang are meant to be excluded:
However in practice they are not excluded since the class names that are checked do NOT have their full package name computed.
For example "java.lang.Class" gets counted since only "Class" is passed to isSignificant().
This is a a big issue...
Here's the file on which I've traced the issue: https://raw.github.com/xwiki/xwiki-commons/a10d6f9ef079c08ef3fd01dd6c1e2ff2a9cc6120/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api/src/main/java/org/xwiki/component/util/ReflectionUtils.java
See https://sourceforge.net/p/checkstyle/bugs/684/