You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
A false positive in UnnecessaryFullyQualifiedName. If the code has an enum "Float" defined, java.lang.Float cannot be referenced anymore without fully qualifying it. PMD warns about the usage of java.lang.Float.floatToIntBits because it doesn't understand this.
Output:
[INFO] PMD Failure: com.DataType:100 Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary use of fully qualified name 'java.lang.Float' due to existing implicit import 'java.lang.*'.
adangel
changed the title
[java] Unnecessary use of fully qualified name: false positive
[java] Unnecessary use of fully qualified name: false positive with enum constant
Nov 6, 2020
adangel
changed the title
[java] Unnecessary use of fully qualified name: false positive with enum constant
[java] UnnecessaryFullyQualifiedName false positive with enum constant
Nov 6, 2020
Affects PMD Version: 6.4.0+
Rule:
UnnecessaryFullyQualifiedName
Description:
A false positive in UnnecessaryFullyQualifiedName. If the code has an enum "Float" defined, java.lang.Float cannot be referenced anymore without fully qualifying it. PMD warns about the usage of java.lang.Float.floatToIntBits because it doesn't understand this.
Code Sample demonstrating the issue:
Running PMD through: Maven
Output:
[INFO] PMD Failure: com.DataType:100 Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary use of fully qualified name 'java.lang.Float' due to existing implicit import 'java.lang.*'.
Based on release notes and searching issues the false positive was introduced in one of these:
https://github.com/pmd/pmd/pull/1141/files
https://github.com/pmd/pmd/pull/1220/files
The text was updated successfully, but these errors were encountered: