diff --git a/doc/ReleaseNotes4.7.md b/doc/ReleaseNotes4.7.md index d33a501e2e5e..1f9607074106 100644 --- a/doc/ReleaseNotes4.7.md +++ b/doc/ReleaseNotes4.7.md @@ -38,12 +38,12 @@ public static class UsesExternalResource { @Override protected void before() throws Throwable { myServer.connect(); - }; + } @Override protected void after() { myServer.disconnect(); - }; + } }; @Test public void testFoo() { diff --git a/doc/ReleaseNotes4.9.md b/doc/ReleaseNotes4.9.md index 5e62cea11d0a..7d8d75880c48 100644 --- a/doc/ReleaseNotes4.9.md +++ b/doc/ReleaseNotes4.9.md @@ -23,12 +23,12 @@ public class UsesExternalResource { @Override protected void before() throws Throwable { myServer.connect(); - }; + } @Override protected void after() { myServer.disconnect(); - }; + } }; } ``` diff --git a/src/test/java/org/junit/rules/ClassRulesTest.java b/src/test/java/org/junit/rules/ClassRulesTest.java index e3100a2cba65..8360322043c8 100644 --- a/src/test/java/org/junit/rules/ClassRulesTest.java +++ b/src/test/java/org/junit/rules/ClassRulesTest.java @@ -126,8 +126,6 @@ public void evaluate() throws Throwable { } } - ; - public static class UsesFieldAndMethodRule { @ClassRule public static OrderTestRule orderMethod() { @@ -227,8 +225,6 @@ public Statement apply(final Statement base, Description description) { public void evaluate() throws Throwable { base.evaluate(); } - - ; }; } } diff --git a/src/test/java/org/junit/rules/ExternalResourceRuleTest.java b/src/test/java/org/junit/rules/ExternalResourceRuleTest.java index 8df68a96f2ab..ba4302e85780 100644 --- a/src/test/java/org/junit/rules/ExternalResourceRuleTest.java +++ b/src/test/java/org/junit/rules/ExternalResourceRuleTest.java @@ -40,14 +40,10 @@ protected void before() throws Throwable { callSequence += "before "; } - ; - @Override protected void after() { callSequence += "after "; } - - ; }; @Test diff --git a/src/test/java/org/junit/rules/MethodRulesTest.java b/src/test/java/org/junit/rules/MethodRulesTest.java index 06cf83cfc7a1..d6efdf272c16 100644 --- a/src/test/java/org/junit/rules/MethodRulesTest.java +++ b/src/test/java/org/junit/rules/MethodRulesTest.java @@ -390,7 +390,7 @@ public void evaluate() throws Throwable { } }; } - }; + } @Rule diff --git a/src/test/java/org/junit/rules/TestRuleTest.java b/src/test/java/org/junit/rules/TestRuleTest.java index a75c0c6f2672..eb62584959ff 100644 --- a/src/test/java/org/junit/rules/TestRuleTest.java +++ b/src/test/java/org/junit/rules/TestRuleTest.java @@ -38,8 +38,6 @@ public void evaluate() throws Throwable { wasRun = true; base.evaluate(); } - - ; }; } }; @@ -110,8 +108,6 @@ public void evaluate() throws Throwable { runCount++; base.evaluate(); } - - ; }; } } @@ -318,8 +314,6 @@ public void evaluate() throws Throwable { wasRun = true; base.evaluate(); } - - ; }; } }; @@ -397,8 +391,6 @@ public void evaluate() throws Throwable { runCount++; base.evaluate(); } - - ; }; } } @@ -703,8 +695,6 @@ public Statement apply(final Statement base, Description description) { public void evaluate() throws Throwable { base.evaluate(); } - - ; }; } } diff --git a/src/test/java/org/junit/runner/notification/RunNotifierTest.java b/src/test/java/org/junit/runner/notification/RunNotifierTest.java index 1c2e7c9f6860..531754f24e99 100644 --- a/src/test/java/org/junit/runner/notification/RunNotifierTest.java +++ b/src/test/java/org/junit/runner/notification/RunNotifierTest.java @@ -95,7 +95,7 @@ public void addFirstAndRemoveWithThreadSafeListener() { @Test public void wrapIfNotThreadSafeShouldNotWrapThreadSafeListeners() { - ThreadSafeListener listener = new ThreadSafeListener();; + ThreadSafeListener listener = new ThreadSafeListener(); assertSame(listener, new RunNotifier().wrapIfNotThreadSafe(listener)); } diff --git a/src/test/java/org/junit/tests/experimental/theories/runner/WithAutoGeneratedDataPoints.java b/src/test/java/org/junit/tests/experimental/theories/runner/WithAutoGeneratedDataPoints.java index 26eb5156e43b..53cab0489744 100644 --- a/src/test/java/org/junit/tests/experimental/theories/runner/WithAutoGeneratedDataPoints.java +++ b/src/test/java/org/junit/tests/experimental/theories/runner/WithAutoGeneratedDataPoints.java @@ -9,7 +9,7 @@ public class WithAutoGeneratedDataPoints { - private enum ENUM { VALUE, OTHER_VALUE, THIRD_VALUE }; + private enum ENUM { VALUE, OTHER_VALUE, THIRD_VALUE } @RunWith(Theories.class) public static class TheoryTestClassWithAutogeneratedParameterValues { diff --git a/src/test/java/org/junit/tests/experimental/theories/runner/WithExtendedParameterSources.java b/src/test/java/org/junit/tests/experimental/theories/runner/WithExtendedParameterSources.java index bcda189588bf..29ffea0608ce 100644 --- a/src/test/java/org/junit/tests/experimental/theories/runner/WithExtendedParameterSources.java +++ b/src/test/java/org/junit/tests/experimental/theories/runner/WithExtendedParameterSources.java @@ -113,8 +113,6 @@ public static String[] STRINGS() { return new String[]{"A", "B"}; } - ; - @Theory public void addToLog(String string) { log += string; @@ -137,8 +135,6 @@ public static String[] STRINGS() { return new String[]{"A", "B"}; } - ; - @DataPoints public static String STRING() { return "C"; diff --git a/src/test/java/org/junit/tests/validation/BadlyFormedClassesTest.java b/src/test/java/org/junit/tests/validation/BadlyFormedClassesTest.java index c3d6e89c6622..df49713bc6a4 100644 --- a/src/test/java/org/junit/tests/validation/BadlyFormedClassesTest.java +++ b/src/test/java/org/junit/tests/validation/BadlyFormedClassesTest.java @@ -28,8 +28,6 @@ public void someTest() { } } - ; - @RunWith(JUnit4ClassRunner.class) public static class BadBeforeMethodWithLegacyRunner { @Before @@ -42,8 +40,6 @@ public void someTest() { } } - ; - public static class NoTests { // class without tests }