Use default Eclipse sort order for members and adjust package
declaration.
diff --git a/commons-testing-junit4/src/main/java/org/apache/commons/testing/junit4/SecurityManagerTestRule.java b/commons-testing-junit4/src/main/java/org/apache/commons/testing/junit4/SecurityManagerTestRule.java
index 9a600ef..effadd1 100644
--- a/commons-testing-junit4/src/main/java/org/apache/commons/testing/junit4/SecurityManagerTestRule.java
+++ b/commons-testing-junit4/src/main/java/org/apache/commons/testing/junit4/SecurityManagerTestRule.java
@@ -15,7 +15,7 @@
* limitations under the license.
*/
-package org.apache.logging.log4j.junit;
+package org.apache.commons.testing.junit4;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
@@ -41,6 +41,10 @@
*/
public class SecurityManagerTestRule implements TestRule {
+ private final SecurityManager securityManager;
+
+ private SecurityManager securityManagerBefore;
+
/**
* Constructs a new instance with the given {@link SecurityManager}.
* <p>
@@ -61,22 +65,9 @@
this.securityManager = securityManager;
}
- private SecurityManager securityManagerBefore;
- private final SecurityManager securityManager;
-
@Override
public Statement apply(final Statement base, final Description description) {
return new Statement() {
- @Override
- public void evaluate() throws Throwable {
- before();
- try {
- base.evaluate();
- } finally {
- after();
- }
- }
-
private void after() {
System.setSecurityManager(securityManagerBefore);
}
@@ -86,6 +77,16 @@
System.setSecurityManager(securityManager);
}
+
+ @Override
+ public void evaluate() throws Throwable {
+ before();
+ try {
+ base.evaluate();
+ } finally {
+ after();
+ }
+ }
};
}