cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1374263 - in /cxf/trunk: api/src/main/java/org/apache/cxf/ api/src/main/java/org/apache/cxf/endpoint/ api/src/main/java/org/apache/cxf/interceptor/ integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/ rt/core/src/main/java/org/apache...
Date Fri, 17 Aug 2012 13:55:47 GMT
Author: dkulp
Date: Fri Aug 17 13:55:46 2012
New Revision: 1374263

URL: http://svn.apache.org/viewvc?rev=1374263&view=rev
Log:
More work to change AbstractFeature -> Feature

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java
    cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
    cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AnnotationInterceptors.java
    cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBeanTest.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java Fri Aug 17 13:55:46 2012
@@ -22,7 +22,7 @@ package org.apache.cxf;
 import java.util.Collection;
 import java.util.Map;
 
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.interceptor.InterceptorProvider;
 
 /**
@@ -53,5 +53,5 @@ public interface Bus extends Interceptor
     Map<String, Object> getProperties();
     
     
-    Collection<AbstractFeature> getFeatures();
+    Collection<Feature> getFeatures();
 }

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java Fri Aug
17 13:55:46 2012
@@ -35,6 +35,7 @@ import org.apache.cxf.binding.BindingFac
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.feature.Feature;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.interceptor.AnnotationInterceptors;
 import org.apache.cxf.message.MessageUtils;
@@ -168,7 +169,7 @@ public abstract class AbstractEndpointFa
     }
 
     public void setFeatures(List<? extends Feature> features2) {
-        this.features = new ArrayList<Feature>(features2);
+        this.features = CastUtils.cast(features2);
     }
 
     public BindingFactory getBindingFactory() {

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java Fri Aug 17 13:55:46
2012
@@ -19,7 +19,6 @@
 
 package org.apache.cxf.endpoint;
 
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
@@ -38,6 +37,7 @@ import org.apache.cxf.common.i18n.Messag
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurable;
 import org.apache.cxf.feature.Feature;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.AbstractAttributedInterceptorProvider;
 import org.apache.cxf.interceptor.ClientFaultConverter;
 import org.apache.cxf.interceptor.InFaultChainInitiatorObserver;
@@ -168,17 +168,17 @@ public class EndpointImpl extends Abstra
     }
     
     /**
-     * @return the list of fearures <b>already</b> activated for this endpoint.
+     * @return the list of features <b>already</b> activated for this endpoint.
      */
     public List<Feature> getActiveFeatures() {
         return activeFeatures;
     }
 
     /**
-     * @param the list of fearures <b>already</b> activated for this endpoint.
+     * @param the list of features <b>already</b> activated for this endpoint.
      */
     public void initializeActiveFeatures(List<? extends Feature> features) {
-        activeFeatures = new ArrayList<Feature>(features);
+        activeFeatures = CastUtils.cast(features);
     }
 
     /**

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AnnotationInterceptors.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AnnotationInterceptors.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AnnotationInterceptors.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AnnotationInterceptors.java Fri
Aug 17 13:55:46 2012
@@ -26,7 +26,7 @@ import java.util.ResourceBundle;
 
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.i18n.BundleUtils;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.feature.Features;
 import org.apache.cxf.message.Message;
 
@@ -147,8 +147,8 @@ public class AnnotationInterceptors {
         return getAnnotationInterceptorList(OutInterceptors.class);
     }
         
-    public List<AbstractFeature> getFeatures() {
-        return getAnnotationObject(Features.class, AbstractFeature.class);
+    public List<Feature> getFeatures() {
+        return getAnnotationObject(Features.class, Feature.class);
     }
 
 }

Modified: cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java
URL: http://svn.apache.org/viewvc/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java (original)
+++ cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java Fri
Aug 17 13:55:46 2012
@@ -28,7 +28,7 @@ import java.util.ResourceBundle;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.service.model.AbstractPropertiesHolder;
 
@@ -141,7 +141,7 @@ public class DummyBus extends AbstractBa
     }
 
 
-    public Collection<AbstractFeature> getFeatures() {
+    public Collection<Feature> getFeatures() {
         // TODO Auto-generated method stub
         return null;
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java Fri Aug 17 13:55:46
2012
@@ -31,7 +31,7 @@ import org.apache.cxf.buslifecycle.BusCr
 import org.apache.cxf.buslifecycle.BusLifeCycleManager;
 import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.feature.LoggingFeature;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 
@@ -56,7 +56,7 @@ public class CXFBusImpl extends Abstract
     protected final Map<Class<?>, Object> extensions;
     protected String id;
     private BusState state;      
-    private final Collection<AbstractFeature> features = new CopyOnWriteArrayList<AbstractFeature>();
+    private final Collection<Feature> features = new CopyOnWriteArrayList<Feature>();
     private final Map<String, Object> properties = new ConcurrentHashMap<String,
Object>(16, 0.75f, 4);
     
     public CXFBusImpl() {
@@ -208,7 +208,7 @@ public class CXFBusImpl extends Abstract
     protected void initializeFeatures() {
         loadAdditionalFeatures();
         if (features != null) {
-            for (AbstractFeature f : features) {
+            for (Feature f : features) {
                 f.initialize(this);
             }
         }
@@ -252,11 +252,11 @@ public class CXFBusImpl extends Abstract
         return state;
     }
 
-    public Collection<AbstractFeature> getFeatures() {
+    public Collection<Feature> getFeatures() {
         return features;
     }
 
-    public synchronized void setFeatures(Collection<AbstractFeature> features) {
+    public synchronized void setFeatures(Collection<? extends Feature> features) {
         this.features.clear();
         this.features.addAll(features);
         if (FORCE_LOGGING) {

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java Fri Aug
17 13:55:46 2012
@@ -23,9 +23,7 @@ package org.apache.cxf.bus.blueprint;
 import org.apache.cxf.bus.extension.ExtensionManagerBus;
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
 import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.feature.Feature;
-import org.apache.cxf.feature.WrappedFeature;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
@@ -53,11 +51,7 @@ public class BlueprintBus extends Extens
             }
             for (ServiceReference ref : refs) {
                 Feature feature = (Feature)context.getService(ref);
-                if (feature instanceof AbstractFeature) {
-                    this.getFeatures().add((AbstractFeature)feature);
-                } else {
-                    this.getFeatures().add(new WrappedFeature(feature));
-                }
+                this.getFeatures().add(feature);
             }
         } catch (InvalidSyntaxException e) {
             //ignore

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=1374263&r1=1374262&r2=1374263&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
Aug 17 13:55:46 2012
@@ -32,7 +32,8 @@ import org.apache.cxf.common.injection.N
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
 import org.apache.cxf.configuration.spring.BusWiringType;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.message.Message;
@@ -144,7 +145,7 @@ public class BusDefinitionParser extends
         CXFBusImpl bus;
         String busName;
         String id;
-        Collection<AbstractFeature> features;
+        Collection<Feature> features;
         Map<String, Object> properties;
         
         public BusConfig(String busName) {
@@ -252,18 +253,18 @@ public class BusDefinitionParser extends
             }
         }
         
-        public Collection<AbstractFeature> getFeatures() {
+        public Collection<Feature> getFeatures() {
             if (bus != null) {
                 return bus.getFeatures();
             }
             return features;
         }
 
-        public void setFeatures(Collection<AbstractFeature> features) {
+        public void setFeatures(Collection<? extends Feature> features) {
             if (bus != null) {
                 bus.setFeatures(features);
             } else {
-                this.features = features;
+                this.features = CastUtils.cast(features);
             }
             
         }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java Fri Aug 17 13:55:46
2012
@@ -27,9 +27,7 @@ import org.apache.cxf.buslifecycle.BusLi
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.configuration.spring.ConfigurerImpl;
-import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.feature.Feature;
-import org.apache.cxf.feature.WrappedFeature;
 import org.apache.cxf.resource.ResourceManager;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
@@ -63,11 +61,7 @@ public class SpringBus extends Extension
             SpringBeanLocator sloc = (SpringBeanLocator)loc;
             List<Feature> features = sloc.getOSGiServices(Feature.class);
             for (Feature feature : features) {
-                if (feature instanceof AbstractFeature) {
-                    this.getFeatures().add((AbstractFeature)feature);
-                } else {
-                    this.getFeatures().add(new WrappedFeature(feature));
-                }
+                this.getFeatures().add(feature);
             }
         }
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Fri Aug 17 13:55:46 2012
@@ -168,7 +168,7 @@ public class ReflectionServiceFactoryBea
     private boolean qualifiedSchemas = true;
     private boolean validate;
 
-    private List<? extends Feature> features;
+    private List<Feature> features;
 
     private Map<Method, Boolean> wrappedCache = new HashMap<Method, Boolean>();
     private Map<Method, Boolean> isRpcCache = new HashMap<Method, Boolean>();
@@ -2534,12 +2534,12 @@ public class ReflectionServiceFactoryBea
         this.ignoredMethods = ignoredMethods;
     }
 
-    public List<? extends Feature> getFeatures() {
+    public List<Feature> getFeatures() {
         return features;
     }
 
     public void setFeatures(List<? extends Feature> features2) {
-        this.features = features2;
+        this.features = CastUtils.cast(features2);
     }
 
     private boolean isValidate() {

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
(original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
Fri Aug 17 13:55:46 2012
@@ -30,6 +30,7 @@ import org.apache.cxf.bus.CXFBusImpl;
 import org.apache.cxf.buslifecycle.BusLifeCycleListener;
 import org.apache.cxf.buslifecycle.BusLifeCycleManager;
 import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.message.Message;
@@ -55,9 +56,9 @@ public class BusDefinitionParserTest ext
         }
         assertTrue("could not find logging interceptor.", found);
    
-        Collection<AbstractFeature> features = ((CXFBusImpl)bus).getFeatures();
+        Collection<Feature> features = ((CXFBusImpl)bus).getFeatures();
         TestFeature tf = null;
-        for (AbstractFeature f : features) {
+        for (Feature f : features) {
             if (f instanceof TestFeature) {
                 tf = (TestFeature)f;
                 break;

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java (original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/SpringBusFactoryTest.java Fri
Aug 17 13:55:46 2012
@@ -39,6 +39,7 @@ import org.apache.cxf.buslifecycle.BusLi
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.endpoint.ServerRegistry;
 import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.message.Message;
@@ -256,7 +257,7 @@ public class SpringBusFactoryTest extend
         
         public void initComplete() {
             assertNull(bus.getExtension(TestFeature.class));
-            Collection<AbstractFeature> features = ((CXFBusImpl)bus).getFeatures();
+            Collection<Feature> features = ((CXFBusImpl)bus).getFeatures();
             assertEquals(1, features.size());
             TestFeature tf = (TestFeature)features.iterator().next();
             assertTrue(tf.initialised);

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java
Fri Aug 17 13:55:46 2012
@@ -26,7 +26,7 @@ import java.util.List;
 import javax.ws.rs.core.MultivaluedMap;
 
 import org.apache.cxf.common.util.ProxyHelper;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.jaxrs.model.UserResource;
 
 /**
@@ -167,7 +167,7 @@ public final class JAXRSClientFactory {
      * @return typed proxy
      */
     public static <T> T create(String baseAddress, Class<T> cls, List<?>
providers,
-                               List<AbstractFeature> features,                    
+                               List<Feature> features,                    
                                String configLocation) {
         JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation);
         bean.setProviders(providers);

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java Fri
Aug 17 13:55:46 2012
@@ -42,7 +42,7 @@ import javax.xml.stream.XMLStreamWriter;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor;
 import org.apache.cxf.interceptor.Fault;
@@ -154,7 +154,7 @@ public class WebClient extends AbstractC
      */
     public static WebClient create(String baseAddress, 
                                    List<?> providers, 
-                                   List<AbstractFeature> features,
+                                   List<? extends Feature> features,
                                    String configLocation) {
         JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation);
         bean.setProviders(providers);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBeanTest.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBeanTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBeanTest.java
Fri Aug 17 13:55:46 2012
@@ -25,6 +25,7 @@ import java.util.List;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.jaxrs.model.UserOperation;
@@ -168,7 +169,7 @@ public class JAXRSClientFactoryBeanTest 
         bean.setAddress("http://bar");
         bean.setResourceClass(BookStoreSubresourcesOnly.class);
         TestFeature testFeature = new TestFeature();
-        List<AbstractFeature> features = new ArrayList<AbstractFeature>();
+        List<Feature> features = new ArrayList<Feature>();
         features.add(testFeature);
         bean.setFeatures(features);
         

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java Fri Aug
17 13:55:46 2012
@@ -59,7 +59,8 @@ import org.apache.cxf.configuration.Conf
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.endpoint.ServerImpl;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
@@ -106,7 +107,7 @@ public class EndpointImpl extends javax.
     private Class<?> implementorClass;
     
     private List<String> schemaLocations;
-    private List<AbstractFeature> features;
+    private List<Feature> features;
     private List<Interceptor<? extends Message>> in 
         = new ModCountCopyOnWriteArrayList<Interceptor<? extends Message>>();
     private List<Interceptor<? extends Message>> out 
@@ -737,15 +738,15 @@ public class EndpointImpl extends javax.
         return handlers;
     }
 
-    public List<AbstractFeature> getFeatures() {
+    public List<Feature> getFeatures() {
         if (features == null) {
-            features = new ArrayList<AbstractFeature>();
+            features = new ArrayList<Feature>();
         }
         return features;
     }
 
-    public void setFeatures(List<AbstractFeature> features) {
-        this.features = features;
+    public void setFeatures(List<? extends Feature> features) {
+        this.features = CastUtils.cast(features);
     }
 
     public Invoker getInvoker() {

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
Fri Aug 17 13:55:46 2012
@@ -53,6 +53,7 @@ import org.apache.cxf.common.logging.Log
 import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.endpoint.EndpointImpl;
 import org.apache.cxf.feature.Feature;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
 import org.apache.cxf.interceptor.Interceptor;
@@ -132,7 +133,11 @@ public class JaxWsEndpointImpl extends E
         super(bus, s, ei);
         this.implInfo = implementorInfo;
         this.wsFeatures = wf;
-        features = new ArrayList<Feature>(af);
+        if (af != null) {
+            features = CastUtils.cast(af);
+        } else {
+            features = new ArrayList<Feature>();
+        }
         createJaxwsBinding();
         
         List<Interceptor<? extends Message>> in = super.getInInterceptors();
      

Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java Fri
Aug 17 13:55:46 2012
@@ -244,7 +244,7 @@ public class EndpointImplTest extends Ab
             assertEquals("BINDING_INCOMPATIBLE_ADDRESS_EXC", ((BusException)ex.getCause()).getCode());
         }
  
-        assertTrue(serviceFactory.getFeatures().size() == 1);
+        assertEquals(1, serviceFactory.getFeatures().size());
         assertTrue(serviceFactory.getFeatures().get(0) instanceof WSAddressingFeature);
     }
 

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
Fri Aug 17 13:55:46 2012
@@ -39,6 +39,7 @@ import org.apache.cxf.databinding.DataBi
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.ConduitSelector;
 import org.apache.cxf.feature.Feature;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.service.factory.FactoryBeanListener;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
@@ -371,7 +372,7 @@ public class ClientProxyFactoryBean exte
     }
 
     public void setFeatures(List<? extends Feature> f) {
-        this.features = new ArrayList<Feature>(f);
+        this.features = CastUtils.cast(f);
     }
 
     public DataBinding getDataBinding() {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Fri Aug 17 13:55:46 2012
@@ -64,7 +64,7 @@ import org.apache.cxf.endpoint.ClientImp
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.endpoint.EndpointImpl;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.interceptor.Fault;
@@ -186,7 +186,7 @@ public class STSClient implements Config
         = new ModCountCopyOnWriteArrayList<Interceptor<? extends Message>>();
     protected List<Interceptor<? extends Message>> inFault 
         = new ModCountCopyOnWriteArrayList<Interceptor<? extends Message>>();
-    protected List<AbstractFeature> features;
+    protected List<Feature> features;
 
     public STSClient(Bus b) {
         bus = b;
@@ -571,7 +571,7 @@ public class STSClient implements Config
         inFault = null;
         outFault = null;
         if (features != null) {
-            for (AbstractFeature f : features) {
+            for (Feature f : features) {
                 f.initialize(client, bus);
             }
         }
@@ -1592,10 +1592,10 @@ public class STSClient implements Config
         getOutFaultInterceptors().addAll(interceptors);
     }
         
-    public void setFeatures(List<AbstractFeature> f) {
-        features = f;
+    public void setFeatures(List<? extends Feature> f) {
+        features = CastUtils.cast(f);
     }
-    public List<AbstractFeature> getFeatures() {
+    public List<Feature> getFeatures() {
         return features;
     }
 }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java?rev=1374263&r1=1374262&r2=1374263&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java
Fri Aug 17 13:55:46 2012
@@ -32,7 +32,7 @@ import org.apache.cxf.clustering.RandomS
 import org.apache.cxf.clustering.RetryStrategy;
 import org.apache.cxf.clustering.SequentialStrategy;
 import org.apache.cxf.endpoint.ConduitSelector;
-import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.jaxrs.client.ClientWebApplicationException;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.ServerWebApplicationException;
@@ -225,7 +225,7 @@ public class FailoverTest extends Abstra
                                                 FailoverFeature feature) {
         JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
         bean.setAddress(address);
-        List<AbstractFeature> features = new ArrayList<AbstractFeature>();
+        List<Feature> features = new ArrayList<Feature>();
         features.add(feature);
         bean.setFeatures(features);
         



Mime
View raw message