From 1a690ed1e83875773183b73a333d421b3cdff062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 1 Jul 2019 18:33:48 +0200 Subject: [PATCH] Fix DoubleBraceInitialization example --- .../resources/category/java/bestpractices.xml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pmd-java/src/main/resources/category/java/bestpractices.xml b/pmd-java/src/main/resources/category/java/bestpractices.xml index acb14b3c08..1cbc1fe9ab 100644 --- a/pmd-java/src/main/resources/category/java/bestpractices.xml +++ b/pmd-java/src/main/resources/category/java/bestpractices.xml @@ -424,16 +424,15 @@ public class Foo { - -(){{addAll("a","b","c");}}; + (){%raw%}{{ addAll("a","b","c"); }};{%endraw%} - // the better way is to not create an anonymous class: - List a=new ArrayList<>(); - a.addAll("a","b","c"); - return a; - ]]> +// the better way is to not create an anonymous class: +List a = new ArrayList<>(); +a.addAll("a","b","c"); +return a; +]]>