Browse Source

Avoid infinite loop in InterceptMethodsBeanDefinitionDecoratorTests when upgrading to Spring 3.0.1.

Converted test target to implement ApplicationListener<SessionCreatedEvent> so that it doesn't receive events from its own interceptor (which are in turn intercepted).
Luke Taylor 15 năm trước cách đây
mục cha
commit
5b5934144a

+ 3 - 3
config/src/test/java/org/springframework/security/config/TestBusinessBeanImpl.java

@@ -1,12 +1,12 @@
 package org.springframework.security.config;
 
-import org.springframework.context.ApplicationEvent;
 import org.springframework.context.ApplicationListener;
+import org.springframework.security.core.session.SessionCreationEvent;
 
 /**
  * @author Luke Taylor
  */
-public class TestBusinessBeanImpl implements TestBusinessBean, ApplicationListener<ApplicationEvent> {
+public class TestBusinessBeanImpl implements TestBusinessBean, ApplicationListener<SessionCreationEvent> {
     public void setInteger(int i) {
     }
 
@@ -27,7 +27,7 @@ public class TestBusinessBeanImpl implements TestBusinessBean, ApplicationListen
     public void unprotected() {
     }
 
-    public void onApplicationEvent(ApplicationEvent event) {
+    public void onApplicationEvent(SessionCreationEvent event) {
         System.out.println(event);
     }
 }