From 2b70986f09a0a0ec90a1c35d3e92719470e59de2 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 29 Feb 2024 08:37:01 +0100 Subject: [PATCH] [java] Verify UnnecessaryFullyQualifiedName #4631 Fixes #4631 --- docs/pages/release_notes.md | 2 ++ .../xml/UnnecessaryFullyQualifiedName.xml | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 6dd6099c26..15279cecfb 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -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 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/UnnecessaryFullyQualifiedName.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/UnnecessaryFullyQualifiedName.xml index 02afbeb2e0..ed66a0033c 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/UnnecessaryFullyQualifiedName.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/UnnecessaryFullyQualifiedName.xml @@ -1067,6 +1067,37 @@ class Scratch { @java.lang.Deprecated int aField; } +]]> + + + + [java] UnnecessaryFullyQualifiedName fails to recognize illegal self reference in enums #4631 + 0 +