[java] UnnecessaryFullyQualifiedName fails to recognize illegal self reference in enums #4631
Labels
a:false-positive
PMD flags a piece of code that is not problematic
Milestone
Affects PMD Version: 6.44.0
Rule: UnnecessaryFullyQualifiedName
Description:
UnnecessaryFullyQualifiedName fails to recognize illegal self reference with enum constructors
Code Sample demonstrating the issue:
https://github.com/runelite/runelite/blob/36979d67f7a0ba420ec3ed3189ac27ff3c1a1abb/runelite-client/src/main/java/net/runelite/client/plugins/woodcutting/Tree.java#L53
This errors because there is a wildcard import above
import static net.runelite.api.ObjectID.*;
, however removingObjectID.
causes an illegal self-reference to the enum.Expected outcome:
PMD doesn't report this as an error.
Running PMD through: maven
The text was updated successfully, but these errors were encountered: