From 6b3ccdf0693945e9077c8c1699b230347328eebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 24 Jun 2019 12:11:12 +0200 Subject: [PATCH] Add a test case --- .../errorprone/xml/NonStaticInitializer.xml | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/NonStaticInitializer.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/NonStaticInitializer.xml index 235904d78b..d66001be47 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/NonStaticInitializer.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/NonStaticInitializer.xml @@ -1,8 +1,7 @@ - + bad 1 @@ -23,7 +22,6 @@ public class Foo { ]]> - Allowed in anonymous classes 0 @@ -72,6 +70,30 @@ public enum Foo { { setCycleDuration(Duration.millis(1200)); } +} + ]]> + + + + Flag in nested local class + 1 + 7 +