diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/BaseCheckTestSupport.java b/src/test/java/com/puppycrawl/tools/checkstyle/BaseCheckTestSupport.java index 6143f6828..67f89b805 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/BaseCheckTestSupport.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/BaseCheckTestSupport.java @@ -90,7 +90,7 @@ public class BaseCheckTestSupport { .toString(); } - protected String getSrcPath(String filename) throws IOException { + protected static String getSrcPath(String filename) throws IOException { return new File("src/test/java/com/puppycrawl/tools/checkstyle/" + filename) .getCanonicalPath(); } @@ -105,7 +105,7 @@ public class BaseCheckTestSupport { verifyAst(expectedTextPrintFileName, actualJavaFileName, false); } - protected void verifyAst(String expectedTextPrintFileName, String actualJavaFileName, + protected static void verifyAst(String expectedTextPrintFileName, String actualJavaFileName, boolean withComments) throws Exception { final String expectedContents = Files.toString(new File(expectedTextPrintFileName), Charsets.UTF_8).replaceAll("\\\\r\\\\n", "\\\\n"); diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java index a4e44ca6b..da343323e 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java @@ -146,5 +146,9 @@ public class AutomaticBeanTest { throw new IllegalStateException(privateField + "," + wrong + "," + val + "," + value); } + public void doSmth() { + privateField = "some value, just for fun"; + } + } }