@ -88,7 +88,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
@@ -88,7 +88,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
privatebooleantargetFilterLifecycle=false;
privateFilterdelegate;
privatevolatileFilterdelegate;
privatefinalObjectdelegateMonitor=newObject();
@ -227,7 +227,6 @@ public class DelegatingFilterProxy extends GenericFilterBean {
@@ -227,7 +227,6 @@ public class DelegatingFilterProxy extends GenericFilterBean {
if(this.targetBeanName==null){
this.targetBeanName=getFilterName();
}
// Fetch Spring root application context and initialize the delegate early,
// if possible. If the root application context will be started after this
// filter proxy, we'll have to resort to lazy initialization.
@ -244,16 +243,18 @@ public class DelegatingFilterProxy extends GenericFilterBean {
@@ -244,16 +243,18 @@ public class DelegatingFilterProxy extends GenericFilterBean {
thrownewIllegalStateException("No WebApplicationContext found: no ContextLoaderListener registered?");
}
this.delegate=initDelegate(wac);
}
this.delegate=initDelegate(wac);
delegateToUse=this.delegate;
}
delegateToUse=this.delegate;
}
// Let the delegate perform the actual doFilter operation.
@ -262,10 +263,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
@@ -262,10 +263,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
@Override
publicvoiddestroy(){
FilterdelegateToUse=null;
synchronized(this.delegateMonitor){
delegateToUse=this.delegate;
}
FilterdelegateToUse=this.delegate;
if(delegateToUse!=null){
destroyDelegate(delegateToUse);
}
@ -282,8 +280,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
@@ -282,8 +280,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {