cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1212664 - in /cxf/trunk: api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
Date Fri, 09 Dec 2011 22:17:49 GMT
Author: dkulp
Date: Fri Dec  9 22:17:48 2011
New Revision: 1212664

URL: http://svn.apache.org/viewvc?rev=1212664&view=rev
Log:
Fix a strange timing issue that could cause features to get wiped out
Make sure the Interceptor lists are all of the CopyOnWrite variety.

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java?rev=1212664&r1=1212663&r2=1212664&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java
Fri Dec  9 22:17:48 2011
@@ -52,19 +52,23 @@ public abstract class AbstractBasicInter
     }
 
     public void setInInterceptors(List<Interceptor<? extends Message>> interceptors)
{
-        in = interceptors;
+        in.clear();
+        in.addAll(interceptors);
     }
 
     public void setInFaultInterceptors(List<Interceptor<? extends Message>> interceptors)
{
-        inFault = interceptors;
+        inFault.clear();
+        inFault.addAll(interceptors);
     }
 
     public void setOutInterceptors(List<Interceptor<? extends Message>> interceptors)
{
-        out = interceptors;
+        out.clear();
+        out.addAll(interceptors);
     }
 
     public void setOutFaultInterceptors(List<Interceptor<? extends Message>>
interceptors) {
-        outFault = interceptors;
+        outFault.clear();
+        outFault.addAll(interceptors);
     }
     
     

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java?rev=1212664&r1=1212663&r2=1212664&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java Fri
Dec  9 22:17:48 2011
@@ -121,29 +121,29 @@ public class BusDefinitionParser extends
         
         public void setBus(Bus bb) {
             CXFBusImpl b = (CXFBusImpl)bb;
-            if (features != null) {
-                b.setFeatures(features);
-                features = null;
-            }
             if (properties != null) {
                 b.setProperties(properties);
                 properties = null;
             }
             if (!getInInterceptors().isEmpty()) {
-                b.setInInterceptors(getInInterceptors());
+                b.getInInterceptors().addAll(getInInterceptors());
             }
             if (!getOutInterceptors().isEmpty()) {
-                b.setOutInterceptors(getOutInterceptors());
+                b.getOutInterceptors().addAll(getOutInterceptors());
             }
             if (!getInFaultInterceptors().isEmpty()) {
-                b.setInFaultInterceptors(getInFaultInterceptors());
+                b.getInFaultInterceptors().addAll(getInFaultInterceptors());
             }
             if (!getOutFaultInterceptors().isEmpty()) {
-                b.setOutFaultInterceptors(getOutFaultInterceptors());
+                b.getOutFaultInterceptors().addAll(getOutFaultInterceptors());
             }
             if (!StringUtils.isEmpty(id)) {
                 b.setId(id);
             }
+            if (features != null) {
+                b.setFeatures(features);
+                features = null;
+            }
             bus = b;
         }
 



Mime
View raw message