[java] UnnecessaryFullyQualifiedName: false positive on clashing static...
A source code analyzer
Brought to you by:
adangel,
juansotuyo
I've fixed it to ignore the enum case. However, this only works, if PMD can detect the actual type of the statically imported class. This means, typeresolution/auxclasspath needs to be enabled and the compiled classes need to be on the classpath during PMD execution.
The fix will be included in PMD 5.3.6 and later.
Commit: https://github.com/pmd/pmd/commit/b4c2a517811f12528fb1cd81a45c465aef81fd27
This issue is actually much broader than enums. Any static import can cause collisions that require an explicit access, for instance:
Also could happen if
PowerMockitowas not a star import:I'm opening a new issue to track this, and reworking this rule.