From 9077c6a71f14946285aafaaa81d93dff85000d39 Mon Sep 17 00:00:00 2001 From: Aryant Tripathi Date: Fri, 11 Oct 2024 22:34:07 +0530 Subject: [PATCH] Support wrapper class in BooleanGetMethodName rule (#5253)\n \n - Updated XPath rule to include both primitive and wrapper class:\n (PrimitiveType[@Kind = 'boolean'] or ClassType[pmd-java:typeIs('java.lang.Boolean')])\n - Added test cases to ensure that methods returning are also flagged correctly.\n - Ensured the rule enforces consistent method naming for both primitive and wrapper types. --- .../pmd/lang/java/rule/codestyle/xml/BooleanGetMethodName.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/BooleanGetMethodName.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/BooleanGetMethodName.xml index 09e067a271..6231601d6d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/BooleanGetMethodName.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/BooleanGetMethodName.xml @@ -86,7 +86,7 @@ public class Foo { - Good name + Good name with boxed Boolean (#5253) 0