2 files changed
+33
No files matched your search
@@ -278,6 +278,7 @@ The rules have been moved into categories with PMD 6.
|
||||
* java-codestyle
|
||||
* [#2847](https://github.com/pmd/pmd/issues/2847): \[java] New Rule: Use Explicit Types
|
||||
* [#4578](https://github.com/pmd/pmd/issues/4578): \[java] CommentDefaultAccessModifier comment needs to be before annotation if present
|
||||
* [#4631](https://github.com/pmd/pmd/issues/4631): \[java] UnnecessaryFullyQualifiedName fails to recognize illegal self reference in enums
|
||||
* [#4645](https://github.com/pmd/pmd/issues/4645): \[java] CommentDefaultAccessModifier - False Positive with JUnit5's ParameterizedTest
|
||||
* [#4754](https://github.com/pmd/pmd/pull/4754): \[java] EmptyControlStatementRule: Add allowCommentedBlocks property
|
||||
* java-design
|
||||
@@ -1433,6 +1434,7 @@ Language specific fixes:
|
||||
* [#4512](https://github.com/pmd/pmd/issues/4512): \[java] MethodArgumentCouldBeFinal shouldn't report unused parameters
|
||||
* [#4557](https://github.com/pmd/pmd/issues/4557): \[java] UnnecessaryImport FP with static imports of overloaded methods
|
||||
* [#4578](https://github.com/pmd/pmd/issues/4578): \[java] CommentDefaultAccessModifier comment needs to be before annotation if present
|
||||
* [#4631](https://github.com/pmd/pmd/issues/4631): \[java] UnnecessaryFullyQualifiedName fails to recognize illegal self reference in enums
|
||||
* [#4645](https://github.com/pmd/pmd/issues/4645): \[java] CommentDefaultAccessModifier - False Positive with JUnit5's ParameterizedTest
|
||||
* [#4754](https://github.com/pmd/pmd/pull/4754): \[java] EmptyControlStatementRule: Add allowCommentedBlocks property
|
||||
* java-design
|
||||
|
||||
+31
@@ -1067,6 +1067,37 @@ class Scratch {
|
||||
@java.lang.Deprecated
|
||||
int aField;
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>[java] UnnecessaryFullyQualifiedName fails to recognize illegal self reference in enums #4631</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
package impl;
|
||||
|
||||
import api.ObjectID;
|
||||
import static api.ObjectID.*;
|
||||
|
||||
public enum Tree {
|
||||
// src/impl/Tree.java:8: UnnecessaryFullyQualifiedName: Unnecessary use of fully qualified name 'ObjectID.TEAK_TREE' due to existing static import 'api.ObjectID.*'
|
||||
TEAK_TREE(ObjectID.TEAK_TREE, TEAK_TREE_30437, TEAK_TREE_40758);
|
||||
|
||||
private final int[] treeIds;
|
||||
|
||||
Tree(int... treeIds) {
|
||||
this.treeIds = treeIds;
|
||||
}
|
||||
}
|
||||
/*
|
||||
package api;
|
||||
|
||||
public final class ObjectID {
|
||||
public static final int TEAK_TREE = 9036;
|
||||
public static final int TEAK_TREE_30437 = 30437;
|
||||
public static final int TEAK_TREE_40758 = 40758;
|
||||
}
|
||||
*/
|
||||
]]></code>
|
||||
</test-code>
|
||||
</test-data>
|
||||
Reference in new issue
Block a user