From ce8ca0652dac7fb4f53279180b92ac489b448a1a Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 29 Feb 2024 08:40:22 +0100 Subject: [PATCH] [java] Verify UnusedPrivateMethod #4625 Fixes #4625 --- docs/pages/release_notes.md | 3 +++ .../bestpractices/xml/UnusedPrivateMethod.xml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 15279cecfb..b98cb2f910 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -275,6 +275,8 @@ The rules have been moved into categories with PMD 6. * [#3751](https://github.com/pmd/pmd/issues/3751): \[java] Rename some node types * [#4628](https://github.com/pmd/pmd/pull/4628): \[java] Support loading classes from java runtime images * [#4753](https://github.com/pmd/pmd/issues/4753): \[java] PMD crashes while using generics and wildcards +* java-bestpractives + * [#4625](https://github.com/pmd/pmd/issues/4625): \[java] UnusedPrivateMethod false positive: Autoboxing into Number * 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 @@ -1403,6 +1405,7 @@ Language specific fixes: * [#4516](https://github.com/pmd/pmd/issues/4516): \[java] UnusedLocalVariable: false-negative with try-with-resources * [#4517](https://github.com/pmd/pmd/issues/4517): \[java] UnusedLocalVariable: false-negative with compound assignments * [#4518](https://github.com/pmd/pmd/issues/4518): \[java] UnusedLocalVariable: false-positive with multiple for-loop indices + * [#4625](https://github.com/pmd/pmd/issues/4625): \[java] UnusedPrivateMethod false positive: Autoboxing into Number * [#4634](https://github.com/pmd/pmd/issues/4634): \[java] JUnit4TestShouldUseTestAnnotation false positive with TestNG * java-codestyle * [#1208](https://github.com/pmd/pmd/issues/1208): \[java] PrematureDeclaration rule false-positive on variable declared to measure time diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml index 2a7e09a935..b4e3494aca 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml @@ -1788,4 +1788,22 @@ public class UnusedAssignmentRule { } ]]> + + + [java] UnusedPrivateMethod false positive: Autoboxing into Number #4625 + 0 + +