Reports JUnit 4.0 @BeforeClass or @AfterClass methods that are not declared public and static, do not return void, or take arguments.

Such methods are easy to create inadvertently, but they will not be executed by JUnit tests runners.

Example:


  public class MainTest {
    @BeforeClass
    String beforeClass(int i) {
    }
  }

After the quick-fix is applied, the method changes to:


  class MainTest {
    @BeforeClass
    public static void beforeClass() {
    }
  }