Use default Eclipse sort order for members and adjust package
authorGary Gregory <garydgregory@gmail.com>
Thu, 1 Mar 2018 23:49:46 +0000 (16:49 -0700)
committerGary Gregory <garydgregory@gmail.com>
Thu, 1 Mar 2018 23:49:46 +0000 (16:49 -0700)
declaration.

commons-testing-junit4/src/main/java/org/apache/commons/testing/junit4/SecurityManagerTestRule.java

index 9a600ef..effadd1 100644 (file)
@@ -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 @@ import org.junit.runners.model.Statement;
  */
 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 @@ public class SecurityManagerTestRule implements TestRule {
         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 @@ public class SecurityManagerTestRule implements TestRule {
                 System.setSecurityManager(securityManager);
 
             }
+
+            @Override
+            public void evaluate() throws Throwable {
+                before();
+                try {
+                    base.evaluate();
+                } finally {
+                    after();
+                }
+            }
         };
     }