From 176fae39d29b967980a40c61d1ceabe0afcb813e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 18 Aug 2024 19:29:39 -0300 Subject: [PATCH] Add test for #5152 --- .../bestpractices/xml/GuardLogStatement.xml | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/GuardLogStatement.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/GuardLogStatement.xml index d76238c8a0..23909014e3 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/GuardLogStatement.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/GuardLogStatement.xml @@ -595,8 +595,28 @@ public class GuardLogStatementTest { public void test() { LOG.info( - "Some message here : foo={}", - GuardLogStatementTest.MY_CONSTANT + "Some message here : foo={}", + GuardLogStatementTest.MY_CONSTANT + ); + } +} + ]]> + + + + #5152 "this" do not require guards + 0 +