From 420505a34423e5f68fab1ac0a4133c2f8b9718a9 Mon Sep 17 00:00:00 2001 From: Oleksii Dykov Date: Sun, 16 Jan 2022 00:40:19 +0200 Subject: [PATCH 1/2] #3701 - fix MissingStaticMethodInNonInstantiatableClass for method local classes --- .../resources/category/java/errorprone.xml | 2 +- ...ngStaticMethodInNonInstantiatableClass.xml | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/pmd-java/src/main/resources/category/java/errorprone.xml b/pmd-java/src/main/resources/category/java/errorprone.xml index a45c37bab1..3427dac0d9 100644 --- a/pmd-java/src/main/resources/category/java/errorprone.xml +++ b/pmd-java/src/main/resources/category/java/errorprone.xml @@ -2547,7 +2547,7 @@ See the property `annotations`. + + + + #3701 - false positive with method inner class + 0 + From 7688346045a7a796ee088d1d1c70adf6cfb800e4 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Mon, 17 Jan 2022 19:04:45 +0100 Subject: [PATCH 2/2] [doc] Update release notes (#3701, #3742) --- docs/pages/release_notes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 03e17c841b..c4067873bb 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -41,6 +41,7 @@ This is a {{ site.pmd.release_type }} release. * [#3679](https://github.com/pmd/pmd/issues/3679): \[java] Make FinalFieldCouldBeStatic detect constant variable * java-errorprone * [#3686](https://github.com/pmd/pmd/issues/3686): \[java] ReturnEmptyCollectionRatherThanNull - false negative with conditioned returns + * [#3701](https://github.com/pmd/pmd/issues/3701): \[java] MissingStaticMethodInNonInstantiatableClass false positive with method inner classes * java-performance * [#3492](https://github.com/pmd/pmd/issues/3492): \[java] UselessStringValueOf: False positive when there is no initial String to append to @@ -57,6 +58,7 @@ This is a {{ site.pmd.release_type }} release. * [#3719](https://github.com/pmd/pmd/pull/3719): \[java] Upgrade log4j to 2.17.1 - [Daniel Paul Searles](https://github.com/squaresurf) * [#3720](https://github.com/pmd/pmd/pull/3720): \[java] New rule: FinalParameterInAbstractMethod - [Vincent Galloy](https://github.com/vgalloy) * [#3724](https://github.com/pmd/pmd/pull/3724): \[java] Fix for #3686 - fix FinalFieldCouldBeStatic - [Oleksii Dykov](https://github.com/dykov) +* [#3742](https://github.com/pmd/pmd/pull/3742): \[java] Fix #3701 - fix MissingStaticMethodInNonInstantiatableClass for method local classes - [Oleksii Dykov](https://github.com/dykov) {% endtocmaker %}