Mark methods as static. #1555
Fixes `MethodMayBeStatic` inspection violations in test code introduced after recent commits. Description: >Reports any methods which may safely be made static. A method may be static if it is not synchronized, it does not reference any of its class' non static methods and non static fields and is not overridden in a sub class.
This commit is contained in:
parent
9fbba0b380
commit
f6b33ebf17
|
|
@ -56,7 +56,7 @@ public class FileTabCharacterTest extends BaseCheckTestSupport{
|
|||
/**
|
||||
* Creates a configuration that is functionally close to that in the docs.
|
||||
*/
|
||||
private DefaultConfiguration createConfig(boolean verbose)
|
||||
private static DefaultConfiguration createConfig(boolean verbose)
|
||||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(FileTabCharacterCheck.class);
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class AutomaticBeanTest {
|
|||
}
|
||||
|
||||
public void setExceptionalMethod(String value) {
|
||||
throw new IllegalStateException("for UT");
|
||||
throw new IllegalStateException(wrong);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ public class DetailASTTest {
|
|||
checkDir(new File("src/test/resources/com/puppycrawl/tools/checkstyle"));
|
||||
}
|
||||
|
||||
private void checkDir(File dir) throws Exception {
|
||||
private static void checkDir(File dir) throws Exception {
|
||||
File[] files = dir.listFiles(new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File file) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue