Browse Source

SEC-1132: Moved ThrowableAnalyzer code to web module as it is only used in ExceptionTranslationFilter

Luke Taylor 16 năm trước cách đây
mục cha
commit
a76cbee4bc

+ 3 - 3
web/src/main/java/org/springframework/security/web/ExceptionTranslationFilter.java

@@ -29,9 +29,9 @@ import org.springframework.security.authentication.AuthenticationTrustResolverIm
 import org.springframework.security.authentication.InsufficientAuthenticationException;
 import org.springframework.security.core.AuthenticationException;
 import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.util.ThrowableAnalyzer;
-import org.springframework.security.util.ThrowableCauseExtractor;
 import org.springframework.security.web.savedrequest.SavedRequest;
+import org.springframework.security.web.util.ThrowableAnalyzer;
+import org.springframework.security.web.util.ThrowableCauseExtractor;
 import org.springframework.util.Assert;
 
 /**
@@ -252,7 +252,7 @@ public class ExceptionTranslationFilter extends SpringSecurityFilter implements
      */
     private static final class DefaultThrowableAnalyzer extends ThrowableAnalyzer {
         /**
-         * @see org.springframework.security.util.ThrowableAnalyzer#initExtractorMap()
+         * @see org.springframework.security.web.util.ThrowableAnalyzer#initExtractorMap()
          */
         protected void initExtractorMap() {
             super.initExtractorMap();

+ 1 - 1
core/src/main/java/org/springframework/security/util/ThrowableAnalyzer.java → web/src/main/java/org/springframework/security/web/util/ThrowableAnalyzer.java

@@ -1,4 +1,4 @@
-package org.springframework.security.util;
+package org.springframework.security.web.util;
 
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;

+ 1 - 1
core/src/main/java/org/springframework/security/util/ThrowableCauseExtractor.java → web/src/main/java/org/springframework/security/web/util/ThrowableCauseExtractor.java

@@ -1,4 +1,4 @@
-package org.springframework.security.util;
+package org.springframework.security.web.util;
 
 
 /**

+ 7 - 4
core/src/test/java/org/springframework/security/util/ThrowableAnalyzerTests.java → web/src/test/java/org/springframework/security/web/util/ThrowableAnalyzerTests.java

@@ -1,7 +1,10 @@
-package org.springframework.security.util;
+package org.springframework.security.web.util;
 
 import java.lang.reflect.InvocationTargetException;
 
+import org.springframework.security.web.util.ThrowableAnalyzer;
+import org.springframework.security.web.util.ThrowableCauseExtractor;
+
 import junit.framework.TestCase;
 
 /**
@@ -82,7 +85,7 @@ public class ThrowableAnalyzerTests extends TestCase {
        // Set up nonstandard analyzer
        this.nonstandardAnalyzer = new ThrowableAnalyzer() {
            /**
-            * @see org.springframework.security.util.ThrowableAnalyzer#initExtractorMap()
+            * @see org.springframework.security.web.util.ThrowableAnalyzer#initExtractorMap()
             */
            @Override
            protected void initExtractorMap() {
@@ -107,7 +110,7 @@ public class ThrowableAnalyzerTests extends TestCase {
             new ThrowableAnalyzer() {
 
                 /**
-                 * @see org.springframework.security.util.ThrowableAnalyzer#initExtractorMap()
+                 * @see org.springframework.security.web.util.ThrowableAnalyzer#initExtractorMap()
                  */
                 @Override
                 protected void initExtractorMap() {
@@ -143,7 +146,7 @@ public class ThrowableAnalyzerTests extends TestCase {
         ThrowableAnalyzer analyzer = new ThrowableAnalyzer() {
 
             /**
-             * @see org.springframework.security.util.ThrowableAnalyzer#initExtractorMap()
+             * @see org.springframework.security.web.util.ThrowableAnalyzer#initExtractorMap()
              */
             @Override
             protected void initExtractorMap() {