cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [04/51] [partial] cxf git commit: Remove all trailing whitespaces
Date Tue, 14 Feb 2017 09:49:09 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/features/throttling/src/main/java/org/apache/cxf/throttling/ThrottlingResponseInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/features/throttling/src/main/java/org/apache/cxf/throttling/ThrottlingResponseInterceptor.java b/rt/features/throttling/src/main/java/org/apache/cxf/throttling/ThrottlingResponseInterceptor.java
index d7afddf..2252a8d 100644
--- a/rt/features/throttling/src/main/java/org/apache/cxf/throttling/ThrottlingResponseInterceptor.java
+++ b/rt/features/throttling/src/main/java/org/apache/cxf/throttling/ThrottlingResponseInterceptor.java
@@ -32,7 +32,7 @@ import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.phase.Phase;
 
 /**
- * 
+ *
  */
 public class ThrottlingResponseInterceptor extends AbstractPhaseInterceptor<Message> {
     public ThrottlingResponseInterceptor() {
@@ -50,7 +50,7 @@ public class ThrottlingResponseInterceptor extends AbstractPhaseInterceptor<Mess
                 }
             }
             Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
-            
+
             if (headers == null) {
                 headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
                 message.put(Message.PROTOCOL_HEADERS, headers);
@@ -63,7 +63,7 @@ public class ThrottlingResponseInterceptor extends AbstractPhaseInterceptor<Mess
                 }
                 r.add(e.getValue());
             }
-            if (rsp.getResponseCode() == 503 && rsp.getDelay() > 0 
+            if (rsp.getResponseCode() == 503 && rsp.getDelay() > 0
                 && !rsp.getResponseHeaders().containsKey("Retry-After")) {
                 String retryAfter = Long.toString(rsp.getDelay() / 1000);
                 headers.put("Retry-After", Collections.singletonList(retryAfter));

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
index ad74d07..122cec5 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
@@ -60,24 +60,24 @@ import org.apache.cxf.transport.DestinationFactoryManager;
 
 
 /**
- * Abstract bean holding functionality common for creating 
+ * Abstract bean holding functionality common for creating
  * JAX-RS Server and Client objects.
  */
 public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
-    
+
     private static final Logger LOG = LogUtils.getL7dLogger(AbstractJAXRSFactoryBean.class);
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(AbstractJAXRSFactoryBean.class);
-    
+
     protected List<String> schemaLocations;
     protected JAXRSServiceFactoryBean serviceFactory;
     protected List<Object> entityProviders = new LinkedList<Object>();
     private Comparator<?> providerComparator;
-    
+
     protected AbstractJAXRSFactoryBean(JAXRSServiceFactoryBean serviceFactory) {
         this.serviceFactory = serviceFactory;
         setBindingId(JAXRSBindingFactory.JAXRS_BINDING_ID);
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -94,14 +94,14 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
         super.setServiceName(name);
         serviceFactory.setServiceName(name);
     }
-    
+
     private void checkBindingFactory(Bus bus) {
         BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
         try {
             bfm.getBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID);
         } catch (Throwable b) {
             //not registered, let's register one
-            bfm.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, 
+            bfm.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
                                        new JAXRSBindingFactory(bus));
         }
     }
@@ -114,14 +114,14 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
         checkBindingFactory(bus);
         serviceFactory.setBus(bus);
     }
-    
+
     /*
      * EndpointInfo contains information form WSDL's physical part such as
      * endpoint address, binding, transport etc. For JAX-RS based EndpointInfo,
      * as there is no WSDL, these information are set manually, eg, default
      * transport is http, binding is JAX-RS binding, endpoint address is from
      * server mainline.
-     */    
+     */
     protected EndpointInfo createEndpointInfo(Service service) throws BusException {
         String transportId = getTransportId();
         if (transportId == null && getAddress() != null) {
@@ -147,11 +147,11 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
         EndpointInfo ei = new EndpointInfo();
         ei.setTransportId(transportId);
         ei.setName(serviceFactory.getService().getName());
-        ei.setAddress(getAddress());        
+        ei.setAddress(getAddress());
 
         BindingInfo bindingInfo = createBindingInfo();
         ei.setBinding(bindingInfo);
-        
+
         if (!StringUtils.isEmpty(publishedEndpointUrl)) {
             ei.setProperty("publishedEndpointUrl", publishedEndpointUrl);
         }
@@ -201,8 +201,8 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
     }
 
     /**
-     * Sets the custom service factory which processes 
-     * the registered classes and providers 
+     * Sets the custom service factory which processes
+     * the registered classes and providers
      * @param serviceFactory the factory
      */
     public void setServiceFactory(JAXRSServiceFactoryBean serviceFactory) {
@@ -218,11 +218,11 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
 
         EndpointInfo ei = createEndpointInfo(service);
         Endpoint ep = new EndpointImpl(getBus(), service, ei);
-        
+
         if (properties != null) {
             ep.putAll(properties);
         }
-        
+
         if (getInInterceptors() != null) {
             ep.getInInterceptors().addAll(getInInterceptors());
         }
@@ -235,7 +235,7 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
         if (getOutFaultInterceptors() != null) {
             ep.getOutFaultInterceptors().addAll(getOutFaultInterceptors());
         }
-        
+
         List<ClassResourceInfo> list = serviceFactory.getRealClassResourceInfo();
         for (ClassResourceInfo cri : list) {
             initializeAnnotationInterceptors(ep, cri.getServiceClass());
@@ -245,33 +245,33 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
         ep.put(JAXRSServiceFactoryBean.class.getName(), serviceFactory);
         return ep;
     }
-    
+
     /**
      * Sets the location of the schema which can be used to validate
      * the incoming XML or JAXB-driven JSON. JAX-RS MessageBodyReader implementations
-     * which have the setSchemaLocations method accepting a list of schema locations 
+     * which have the setSchemaLocations method accepting a list of schema locations
      * will be injected with this value.
-     * 
+     *
      * @param schema the schema location
      */
     public void setSchemaLocation(String schema) {
-        setSchemaLocations(Collections.singletonList(schema));    
+        setSchemaLocations(Collections.singletonList(schema));
     }
-    
+
     /**
      * Sets the locations of the schemas which can be used to validate
      * the incoming XML or JAXB-driven JSON. JAX-RS MessageBodyReader implementations
-     * which have the setSchemaLocations method accepting a list of schema locations 
+     * which have the setSchemaLocations method accepting a list of schema locations
      * will be injected with this value.
-     * 
+     *
      * For example, if A.xsd imports B.xsd then both A.xsd and B.xsd need to be referenced.
-     * 
+     *
      * @param schema the schema locations
      */
     public void setSchemaLocations(List<String> schemas) {
-        this.schemaLocations = schemas;    
+        this.schemaLocations = schemas;
     }
-    
+
     /**
      * @return the list of custom JAX-RS providers
      */
@@ -281,7 +281,7 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
 
     /**
      * Add custom JAX-RS providers to the list of providers
-     * 
+     *
      * @param entityProviders the entityProviders
      */
     public void setProviders(List<? extends Object> providers) {
@@ -289,10 +289,10 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
         addToBeans(newBeans, providers);
         this.entityProviders.addAll(newBeans);
     }
-    
+
     /**
      * Add custom JAX-RS provider to the list of providers
-     * 
+     *
      * @param provider the custom provider.
      */
     public void setProvider(Object provider) {
@@ -310,43 +310,43 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
             }
         }
         if (list.size() == 0) {
-            org.apache.cxf.common.i18n.Message msg = 
-                new org.apache.cxf.common.i18n.Message("NO_RESOURCES_AVAILABLE", 
+            org.apache.cxf.common.i18n.Message msg =
+                new org.apache.cxf.common.i18n.Message("NO_RESOURCES_AVAILABLE",
                                                        BUNDLE);
             LOG.severe(msg.toString());
             throw new ServiceConstructionException(msg);
         }
     }
-    
+
     protected boolean isValidClassResourceInfo(ClassResourceInfo cri) {
         Class<?> serviceCls = cri.getServiceClass();
-        return !(cri.isCreatedFromModel() && serviceCls == cri.getResourceClass() 
+        return !(cri.isCreatedFromModel() && serviceCls == cri.getResourceClass()
             && !InjectionUtils.isConcreteClass(serviceCls));
     }
-    
-    protected void setupFactory(ProviderFactory factory, Endpoint ep) { 
+
+    protected void setupFactory(ProviderFactory factory, Endpoint ep) {
         if (providerComparator != null) {
             factory.setProviderComparator(providerComparator);
         }
         if (entityProviders != null) {
-            factory.setUserProviders(entityProviders); 
+            factory.setUserProviders(entityProviders);
         }
         setDataBindingProvider(factory, ep.getService());
-        
+
         factory.setBus(getBus());
         factory.initProviders(serviceFactory.getRealClassResourceInfo());
         if (schemaLocations != null) {
             factory.setSchemaLocations(schemaLocations);
         }
-        
+
         ep.put(factory.getClass().getName(), factory);
     }
-    
+
     protected void setDataBindingProvider(ProviderFactory factory, Service s) {
-        
+
         List<ClassResourceInfo> cris = serviceFactory.getRealClassResourceInfo();
         if (getDataBinding() == null && cris.size() > 0) {
-            org.apache.cxf.annotations.DataBinding ann = 
+            org.apache.cxf.annotations.DataBinding ann =
                 cris.get(0).getServiceClass().getAnnotation(org.apache.cxf.annotations.DataBinding.class);
             if (ann != null) {
                 try {
@@ -366,47 +366,47 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
         db.initialize(s);
         factory.setUserProviders(Collections.singletonList(new DataBindingProvider<Object>(db)));
     }
-    
+
     /**
      * Sets the description of root resources.
      * Can be used to 'attach' the JAX-RS like description to the application
      * classes without adding JAX-RS annotations.
-     *   
-     * @param resources root resource descriptions 
+     *
+     * @param resources root resource descriptions
      */
     public void setModelBeans(UserResource... resources) {
         setModelBeans(Arrays.asList(resources));
     }
-    
+
     /**
      * Sets the description of root resources.
      * Can be used to 'attach' the JAX-RS like description to the application
      * classes without adding JAX-RS annotations.
-     *   
-     * @param resources root resource descriptions 
+     *
+     * @param resources root resource descriptions
      */
     public void setModelBeans(List<UserResource> resources) {
         serviceFactory.setUserResources(resources);
     }
-    
+
     /**
      * Sets the description of root resources with the list of concrete classes.
      * Can be used to 'attach' the JAX-RS like description to the application
      * classes without adding JAX-RS annotations. Some models may only reference
      * interfaces, thus providing a list of concrete classes that will be
      * instantiated is required in such cases.
-     *   
+     *
      * @param resources root resource descriptions.
      * @param sClasses concrete root resource classes
      */
     public void setModelBeansWithServiceClass(List<UserResource> resources, Class<?>... sClasses) {
         serviceFactory.setUserResourcesWithServiceClass(resources, sClasses);
     }
-    
+
     /**
-     * Sets a reference to the external user model, 
+     * Sets a reference to the external user model,
      * Example: "classpath:/model/resources.xml"
-     * 
+     *
      * @param modelRef the reference to the external model resource.
      */
     public void setModelRef(String modelRef) {
@@ -415,13 +415,13 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
             serviceFactory.setUserResources(resources);
         }
     }
-    
+
     /**
-     * Sets a reference to the external user model, 
+     * Sets a reference to the external user model,
      * Example: "classpath:/model/resources.xml".
-     * Some models may only reference interfaces, thus providing a list of 
+     * Some models may only reference interfaces, thus providing a list of
      * concrete classes that will be instantiated is required in such cases.
-     * 
+     *
      * @param modelRef the reference to the external model resource.
      * @param sClasses concrete root resource classes
      */
@@ -434,6 +434,6 @@ public class AbstractJAXRSFactoryBean extends AbstractEndpointFactory {
     public void setProviderComparator(Comparator<?> providerComparator) {
         this.providerComparator = providerComparator;
     }
-    
-    
+
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java
index 92687e8..bf4cc7d 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java
@@ -25,9 +25,9 @@ import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.service.model.BindingInfo;
 
 public class JAXRSBinding extends AbstractBasicInterceptorProvider implements Binding {
-    
+
     private BindingInfo bindingInfo;
-    
+
     public JAXRSBinding(BindingInfo bindingInfo) {
         super();
         this.bindingInfo = bindingInfo;
@@ -43,10 +43,10 @@ public class JAXRSBinding extends AbstractBasicInterceptorProvider implements Bi
 
     public org.apache.cxf.message.Message createMessage(org.apache.cxf.message.Message m) {
         if (!m.containsKey(org.apache.cxf.message.Message.CONTENT_TYPE)) {
-            
+
             String ct = null;
-            
-            // Should this be done in ServiceInvokerInterceptor to support a case where the 
+
+            // Should this be done in ServiceInvokerInterceptor to support a case where the
             // response content type is detected early on the inbound chain for all the bindings ?
             Exchange exchange = m.getExchange();
             if (exchange != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBindingFactory.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBindingFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBindingFactory.java
index 3fa2c3f..c124661 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBindingFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBindingFactory.java
@@ -39,16 +39,16 @@ import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.transport.Destination;
 
 /**
- * The CXF BindingFactory implementation which is used to register 
+ * The CXF BindingFactory implementation which is used to register
  * CXF JAX-RS interceptors with the runtime.
  */
 @NoJSR250Annotations(unlessNull = { "bus" })
 public class JAXRSBindingFactory extends AbstractBindingFactory {
     public static final String JAXRS_BINDING_ID = "http://apache.org/cxf/binding/jaxrs";
-    
+
     private static final Logger LOG = LogUtils.getL7dLogger(JAXRSBindingFactory.class);
 
-    
+
     public JAXRSBindingFactory() {
     }
     public JAXRSBindingFactory(Bus b) {
@@ -59,15 +59,15 @@ public class JAXRSBindingFactory extends AbstractBindingFactory {
         JAXRSBinding binding = new JAXRSBinding(bi);
 
         binding.getInInterceptors().add(new JAXRSInInterceptor());
-        
+
         binding.getOutInterceptors().add(new JAXRSOutInterceptor());
-        
+
         binding.getOutFaultInterceptors().add(new JAXRSDefaultFaultOutInterceptor());
-        
+
         return binding;
     }
-    
-    
+
+
 
     /*
      * The concept of Binding can not be applied to JAX-RS. Here we use
@@ -78,7 +78,7 @@ public class JAXRSBindingFactory extends AbstractBindingFactory {
         info.setName(new QName(JAXRSBindingFactory.JAXRS_BINDING_ID, "binding"));
         return info;
     }
-    
+
     public void addListener(Destination d, Endpoint e) {
         synchronized (d) {
             if (d.getMessageObserver() != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
index 32b6243..b002f50 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
@@ -64,18 +64,18 @@ public class JAXRSInvoker extends AbstractInvoker {
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSInvoker.class);
     private static final String SERVICE_LOADER_AS_CONTEXT = "org.apache.cxf.serviceloader-context";
     private static final String SERVICE_OBJECT_SCOPE = "org.apache.cxf.service.scope";
-    private static final String REQUEST_SCOPE = "request";    
+    private static final String REQUEST_SCOPE = "request";
     private static final String LAST_SERVICE_OBJECT = "org.apache.cxf.service.object.last";
-    private static final String PROXY_INVOCATION_ERROR_FRAGMENT 
-        = "object is not an instance of declaring class"; 
-    
+    private static final String PROXY_INVOCATION_ERROR_FRAGMENT
+        = "object is not an instance of declaring class";
+
     public JAXRSInvoker() {
     }
 
     public Object invoke(Exchange exchange, Object request) {
         MessageContentsList responseList = checkExchangeForResponse(exchange);
         if (responseList != null) {
-            return responseList; 
+            return responseList;
         }
         AsyncResponse asyncResp = exchange.get(AsyncResponse.class);
         if (asyncResp != null) {
@@ -88,26 +88,26 @@ public class JAXRSInvoker extends AbstractInvoker {
                 return handleAsyncFault(exchange, asyncImpl, t);
             }
         }
-        
+
         ResourceProvider provider = getResourceProvider(exchange);
         Object rootInstance = null;
         Message inMessage = exchange.getInMessage();
         try {
             rootInstance = getServiceObject(exchange);
             Object serviceObject = getActualServiceObject(exchange, rootInstance);
-            
+
             return invoke(exchange, request, serviceObject);
         } catch (WebApplicationException ex) {
             responseList = checkExchangeForResponse(exchange);
             if (responseList != null) {
-                return responseList; 
+                return responseList;
             }
             return handleFault(ex, inMessage);
         } finally {
             boolean suspended = isSuspended(exchange);
             if (suspended || exchange.isOneWay() || inMessage.get(Message.THREAD_CONTEXT_SWITCHED) != null) {
                 ServerProviderFactory.clearThreadLocalProxies(inMessage);
-            } 
+            }
             if (suspended || isServiceObjectRequestScope(inMessage)) {
                 persistRoots(exchange, rootInstance, provider);
             } else {
@@ -119,7 +119,7 @@ public class JAXRSInvoker extends AbstractInvoker {
     private boolean isSuspended(Exchange exchange) {
         return exchange.getInMessage().getInterceptorChain().getState() == State.SUSPENDED;
     }
-    
+
     private Object handleAsyncResponse(Exchange exchange, AsyncResponseImpl ar) {
         Object asyncObj = ar.getResponseObject();
         if (asyncObj instanceof Throwable) {
@@ -129,7 +129,7 @@ public class JAXRSInvoker extends AbstractInvoker {
             return new MessageContentsList(asyncObj);
         }
     }
-    
+
     private Object handleAsyncFault(Exchange exchange, AsyncResponseImpl ar, Throwable t) {
         try {
             return handleFault(new Fault(t), exchange.getInMessage(), null, null);
@@ -142,12 +142,12 @@ public class JAXRSInvoker extends AbstractInvoker {
             return new MessageContentsList(Response.serverError().build());
         }
     }
-    
+
     private void persistRoots(Exchange exchange, Object rootInstance, Object provider) {
         exchange.put(JAXRSUtils.ROOT_INSTANCE, rootInstance);
         exchange.put(JAXRSUtils.ROOT_PROVIDER, provider);
     }
-    
+
     @SuppressWarnings("unchecked")
     public Object invoke(Exchange exchange, Object request, Object resourceObject) {
 
@@ -164,10 +164,10 @@ public class JAXRSInvoker extends AbstractInvoker {
                                               inMessage);
             }
         }
-        
-        
+
+
         Method methodToInvoke = getMethodToInvoke(cri, ori, resourceObject);
-        
+
         List<Object> params = null;
         if (request instanceof List) {
             params = CastUtils.cast((List<?>)request);
@@ -197,8 +197,8 @@ public class JAXRSInvoker extends AbstractInvoker {
         } catch (Fault ex) {
             Object faultResponse;
             if (asyncResponse != null) {
-                faultResponse = handleAsyncFault(exchange, asyncResponse, 
-                                                 ex.getCause() == null ? ex : ex.getCause());    
+                faultResponse = handleAsyncFault(exchange, asyncResponse,
+                                                 ex.getCause() == null ? ex : ex.getCause());
             } else {
                 faultResponse = handleFault(ex, inMessage, cri, methodToInvoke);
             }
@@ -244,15 +244,15 @@ public class JAXRSInvoker extends AbstractInvoker {
                                                          acceptContentType);
                 exchange.put(OperationResourceInfo.class, subOri);
                 inMessage.put(URITemplate.TEMPLATE_PARAMETERS, values);
-            
+
                 if (!subOri.isSubResourceLocator()
                     && JAXRSUtils.runContainerRequestFilters(providerFactory,
                                                              inMessage,
-                                                             false, 
+                                                             false,
                                                              subOri.getNameBindings())) {
                     return new MessageContentsList(exchange.get(Response.class));
                 }
-                
+
                 // work out request parameters for the sub-resource class. Here we
                 // presume InputStream has not been consumed yet by the root resource class.
                 List<Object> newParams = JAXRSUtils.processParameters(subOri, values, inMessage);
@@ -267,9 +267,9 @@ public class JAXRSInvoker extends AbstractInvoker {
                 return new MessageContentsList(resp);
             } catch (WebApplicationException ex) {
                 Response excResponse;
-                if (JAXRSUtils.noResourceMethodForOptions(ex.getResponse(), 
+                if (JAXRSUtils.noResourceMethodForOptions(ex.getResponse(),
                         (String)inMessage.get(Message.HTTP_REQUEST_METHOD))) {
-                    excResponse = JAXRSUtils.createResponse(Collections.singletonList(subCri), 
+                    excResponse = JAXRSUtils.createResponse(Collections.singletonList(subCri),
                                                             null, null, 200, true);
                 } else {
                     excResponse = JAXRSUtils.convertFaultToResponse(ex, inMessage);
@@ -283,7 +283,7 @@ public class JAXRSInvoker extends AbstractInvoker {
 
     protected Method getMethodToInvoke(ClassResourceInfo cri, OperationResourceInfo ori, Object resourceObject) {
         Method resourceMethod = cri.getMethodDispatcher().getMethod(ori);
-        
+
         Method methodToInvoke = null;
         if (Proxy.class.isInstance(resourceObject)) {
             methodToInvoke = cri.getMethodDispatcher().getProxyMethod(resourceMethod);
@@ -296,7 +296,7 @@ public class JAXRSInvoker extends AbstractInvoker {
         }
         return methodToInvoke;
     }
-    
+
     private MessageContentsList checkExchangeForResponse(Exchange exchange) {
         Response r = exchange.get(Response.class);
         if (r != null) {
@@ -306,7 +306,7 @@ public class JAXRSInvoker extends AbstractInvoker {
             return null;
         }
     }
-    
+
     private void setResponseContentTypeIfNeeded(Message inMessage, Object response) {
         if (response instanceof Response) {
             JAXRSUtils.setMessageContentType(inMessage, (Response)response);
@@ -315,10 +315,10 @@ public class JAXRSInvoker extends AbstractInvoker {
     private Object handleFault(Throwable ex, Message inMessage) {
         return handleFault(new Fault(ex), inMessage, null, null);
     }
-    private Object handleFault(Fault ex, Message inMessage, 
+    private Object handleFault(Fault ex, Message inMessage,
                                ClassResourceInfo cri, Method methodToInvoke) {
         String errorMessage = ex.getMessage();
-        if (errorMessage != null && cri != null 
+        if (errorMessage != null && cri != null
             && errorMessage.contains(PROXY_INVOCATION_ERROR_FRAGMENT)) {
             org.apache.cxf.common.i18n.Message errorM =
                 new org.apache.cxf.common.i18n.Message("PROXY_INVOCATION_FAILURE",
@@ -327,10 +327,10 @@ public class JAXRSInvoker extends AbstractInvoker {
                                                        cri.getServiceClass().getName());
             LOG.severe(errorM.toString());
         }
-        Response excResponse = 
+        Response excResponse =
             JAXRSUtils.convertFaultToResponse(ex.getCause() == null ? ex : ex.getCause(), inMessage);
         if (excResponse == null) {
-            inMessage.getExchange().put(Message.PROPOGATE_EXCEPTION, 
+            inMessage.getExchange().put(Message.PROPOGATE_EXCEPTION,
                                         ExceptionUtils.propogateException(inMessage));
             throw ex;
         }
@@ -340,24 +340,24 @@ public class JAXRSInvoker extends AbstractInvoker {
     @SuppressWarnings("unchecked")
     protected MultivaluedMap<String, String> getTemplateValues(Message msg) {
         MultivaluedMap<String, String> values = new MetadataMap<String, String>();
-        MultivaluedMap<String, String> oldValues = 
+        MultivaluedMap<String, String> oldValues =
             (MultivaluedMap<String, String>)msg.get(URITemplate.TEMPLATE_PARAMETERS);
         if (oldValues != null) {
             values.putAll(oldValues);
         }
         return values;
     }
-    
+
     private boolean setServiceLoaderAsContextLoader(Message inMessage) {
         Object en = inMessage.getContextualProperty(SERVICE_LOADER_AS_CONTEXT);
         return Boolean.TRUE.equals(en) || "true".equals(en);
     }
-    
+
     private boolean isServiceObjectRequestScope(Message inMessage) {
         Object scope = inMessage.getContextualProperty(SERVICE_OBJECT_SCOPE);
         return REQUEST_SCOPE.equals(scope);
     }
-    
+
     private ResourceProvider getResourceProvider(Exchange exchange) {
         Object provider = exchange.remove(JAXRSUtils.ROOT_PROVIDER);
         if (provider == null) {
@@ -368,30 +368,30 @@ public class JAXRSInvoker extends AbstractInvoker {
             return (ResourceProvider)provider;
         }
     }
-    
+
     public Object getServiceObject(Exchange exchange) {
-        
+
         Object root = exchange.remove(JAXRSUtils.ROOT_INSTANCE);
         if (root != null) {
             return root;
         }
-        
+
         OperationResourceInfo ori = exchange.get(OperationResourceInfo.class);
         ClassResourceInfo cri = ori.getClassResourceInfo();
 
         return cri.getResourceProvider().getInstance(exchange.getInMessage());
     }
-    
+
     protected Object getActualServiceObject(Exchange exchange, Object rootInstance) {
-        
+
         Object last = exchange.get(LAST_SERVICE_OBJECT);
         return last !=  null ? last : rootInstance;
     }
-    
-    
-    
+
+
+
     private static Object checkResultObject(Object result, String subResourcePath) {
-        
+
 
         //the result becomes the object that will handle the request
         if (result != null) {
@@ -415,5 +415,5 @@ public class JAXRSInvoker extends AbstractInvoker {
         return result;
     }
 
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
index 47a45e7..8a424bf 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
@@ -64,18 +64,18 @@ import org.apache.cxf.service.invoker.Invoker;
  * sf.setAddress("http://localhost:9080/");
  * Server myServer = sf.create();
  * </pre>
- * This will start a server for you and register it with the ServerManager.  Note 
+ * This will start a server for you and register it with the ServerManager.  Note
  * you should explicitly close the {@link org.apache.cxf.endpoint.Server} created
  * when finished with it:
  * <pre>
  * myServer.close();
  * myServer.destroy(); // closes first if close() not previously called
- * </pre> 
+ * </pre>
  */
 public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
-    
+
     protected Map<Class<?>, ResourceProvider> resourceProviders = new HashMap<Class<?>, ResourceProvider>();
-    
+
     private Server server;
     private boolean start = true;
     private Map<Object, Object> languageMappings;
@@ -83,7 +83,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     private ResourceComparator rc;
     private ApplicationInfo appProvider;
     private String documentLocation;
-    
+
     public JAXRSServerFactoryBean() {
         this(new JAXRSServiceFactoryBean());
     }
@@ -91,7 +91,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     public JAXRSServerFactoryBean(JAXRSServiceFactoryBean sf) {
         super(sf);
     }
-    
+
     /**
      * Saves the reference to the JAX-RS {@link Application}
      * @param app
@@ -99,7 +99,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     public void setApplication(Application app) {
         setApplicationInfo(new ApplicationInfo(app, getBus()));
     }
-    
+
     public void setApplicationInfo(ApplicationInfo provider) {
         appProvider = provider;
         Set<String> appNameBindings = AnnotationUtils.getNameBindings(provider.getProvider()
@@ -110,29 +110,29 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
             cri.setNameBindings(clsNameBindings);
         }
     }
-    
+
     /**
-     * Resource comparator which may be used to customize the way 
-     * a root resource or resource method is selected 
+     * Resource comparator which may be used to customize the way
+     * a root resource or resource method is selected
      * @param rcomp comparator
      */
     public void setResourceComparator(ResourceComparator rcomp) {
         rc = rcomp;
     }
-    
+
     /**
      * By default the subresources are resolved dynamically, mainly due to
      * the JAX-RS specification allowing Objects being returned from the subresource
-     * locators. Setting this property to true enables the runtime to do the 
+     * locators. Setting this property to true enables the runtime to do the
      * early resolution.
-     * 
+     *
      * @param enableStatic enabling the static resolution if set to true
      */
     public void setStaticSubresourceResolution(boolean enableStatic) {
         serviceFactory.setEnableStaticResolution(enableStatic);
     }
 
-    
+
     /**
      * Creates the JAX-RS Server instance
      * @return the server
@@ -142,7 +142,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
             create();
         }
     }
-    
+
     /**
      * Creates the JAX-RS Server instance
      * @return the server
@@ -161,24 +161,24 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
                 serviceFactory.create();
                 updateClassResourceProviders();
             }
-            
+
             Endpoint ep = createEndpoint();
 
             getServiceFactory().sendEvent(FactoryBeanListener.Event.PRE_SERVER_CREATE,
                                           server);
-            
-            server = new ServerImpl(getBus(), 
-                                    ep, 
-                                    getDestinationFactory(), 
+
+            server = new ServerImpl(getBus(),
+                                    ep,
+                                    getDestinationFactory(),
                                     getBindingFactory());
 
-            Invoker invoker = serviceFactory.getInvoker(); 
+            Invoker invoker = serviceFactory.getInvoker();
             if (invoker == null) {
                 ep.getService().setInvoker(createInvoker());
             } else {
                 ep.getService().setInvoker(invoker);
             }
-            
+
             ServerProviderFactory factory = setupFactory(ep);
             ep.put(Application.class.getName(), appProvider);
             factory.setRequestPreprocessor(
@@ -191,17 +191,17 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
                 ep.put("org.apache.cxf.jaxrs.comparator", rc);
             }
             checkPrivateEndpoint(ep);
-            
+
             factory.applyDynamicFeatures(getServiceFactory().getClassResourceInfo());
             applyBusFeatures(getBus());
             applyFeatures();
 
             getServiceFactory().sendEvent(FactoryBeanListener.Event.SERVER_CREATED,
-                                          server, 
+                                          server,
                                           null,
                                           null);
-            
-            
+
+
             if (start) {
                 try {
                     server.start();
@@ -230,9 +230,9 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     public Server getServer() {
         return server;
     }
-    
-    protected ServerProviderFactory setupFactory(Endpoint ep) { 
-        ServerProviderFactory factory = ServerProviderFactory.createInstance(getBus()); 
+
+    protected ServerProviderFactory setupFactory(Endpoint ep) {
+        ServerProviderFactory factory = ServerProviderFactory.createInstance(getBus());
         setBeanInfo(factory);
         factory.setApplicationProvider(appProvider);
         super.setupFactory(factory, ep);
@@ -244,9 +244,9 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
         for (ClassResourceInfo cri : cris) {
             cri.initBeanParamInfo(factory);
         }
-        
+
     }
-    
+
     protected void applyBusFeatures(final Bus bus) {
         if (bus.getFeatures() != null) {
             for (Feature feature : bus.getFeatures()) {
@@ -254,7 +254,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
             }
         }
     }
-    
+
     protected void applyFeatures() {
         if (getFeatures() != null) {
             for (Feature feature : getFeatures()) {
@@ -268,29 +268,29 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     }
 
     /**
-     * Sets the language mappings, 
+     * Sets the language mappings,
      * example, 'en' is the key and 'en-gb' is the value.
-     * 
+     *
      * @param lMaps the language mappings
      */
     public void setLanguageMappings(Map<Object, Object> lMaps) {
         languageMappings = lMaps;
     }
-    
+
     /**
-     * Sets the extension mappings, 
+     * Sets the extension mappings,
      * example, 'xml' is the key and 'text/xml' is the value.
-     * 
+     *
      * @param lMaps the extension mappings
      */
     public void setExtensionMappings(Map<Object, Object> extMaps) {
         extensionMappings = extMaps;
     }
-    
+
     public List<Class<?>> getResourceClasses() {
         return serviceFactory.getResourceClasses();
     }
-    
+
     /**
      * This method is used primarily by Spring handler processing
      * the jaxrs:server/@serviceClass attribute. It delegates to
@@ -302,7 +302,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     }
 
     /**
-     * Sets one or more root resource classes 
+     * Sets one or more root resource classes
      * @param classes the list of resource classes
      */
     public void setResourceClasses(List<Class<?>> classes) {
@@ -310,47 +310,47 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     }
 
     /**
-     * Sets one or more root resource classes 
+     * Sets one or more root resource classes
      * @param classes the array of resource classes
      */
     public void setResourceClasses(Class<?>... classes) {
         serviceFactory.setResourceClasses(classes);
     }
-    
+
     /**
-     * Sets the resource beans. If this is set then the JAX-RS runtime 
+     * Sets the resource beans. If this is set then the JAX-RS runtime
      * will not be responsible for the life-cycle of resource classes.
-     * 
+     *
      * @param beans the array of resource instances
      */
     public void setServiceBeanObjects(Object... beans) {
         setServiceBeans(Arrays.asList(beans));
     }
-    
+
     /**
-     * Sets the single resource bean. If this is set then the JAX-RS runtime 
+     * Sets the single resource bean. If this is set then the JAX-RS runtime
      * will not be responsible for the life-cycle of resource classes.
      * Please avoid setting the resource class of this bean explicitly,
-     * the runtime will determine it itself.  
-     * 
+     * the runtime will determine it itself.
+     *
      * @param bean resource instance
      */
     public void setServiceBean(Object bean) {
         setServiceBeans(Arrays.asList(bean));
     }
-    
+
     /**
-     * Sets the resource beans. If this is set then the JAX-RS runtime 
+     * Sets the resource beans. If this is set then the JAX-RS runtime
      * will not be responsible for the life-cycle of resource classes.
-     * 
+     *
      * @param beans the list of resource instances
      */
     public void setServiceBeans(List<Object> beans) {
         List<Object> newBeans = new ArrayList<>();
         addToBeans(newBeans, beans);
         serviceFactory.setResourceClassesFromBeans(newBeans);
-    }    
-    
+    }
+
     /**
      * Sets the provider managing the life-cycle of the given resource class
      * <pre>
@@ -363,7 +363,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     public void setResourceProvider(Class<?> c, ResourceProvider rp) {
         resourceProviders.put(c, rp);
     }
-    
+
     /**
      * Sets the provider managing the life-cycle of the resource class
      * <pre>
@@ -375,10 +375,10 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     public void setResourceProvider(ResourceProvider rp) {
         setResourceProviders(CastUtils.cast(Collections.singletonList(rp), ResourceProvider.class));
     }
-    
+
     /**
      * Sets the list of providers managing the life-cycle of the resource classes
-     * 
+     *
      * @param rps resource providers
      */
     public void setResourceProviders(List<ResourceProvider> rps) {
@@ -390,7 +390,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     }
 
     /**
-     * Sets the custom Invoker which can be used to customize the way 
+     * Sets the custom Invoker which can be used to customize the way
      * the default JAX-RS invoker calls on the service bean
      * @param invoker
      */
@@ -411,28 +411,28 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
         Application application = appProvider == null ? null : appProvider.getProvider();
         for (ClassResourceInfo cri : serviceFactory.getClassResourceInfo()) {
             if (cri.isSingleton()) {
-                InjectionUtils.injectContextProxiesAndApplication(cri, 
+                InjectionUtils.injectContextProxiesAndApplication(cri,
                                                     cri.getResourceProvider().getInstance(null),
                                                     application);
             }
         }
         if (application != null) {
-            InjectionUtils.injectContextProxiesAndApplication(appProvider, 
+            InjectionUtils.injectContextProxiesAndApplication(appProvider,
                                                               application, null);
         }
     }
-    
+
     protected void updateClassResourceProviders() {
         for (ClassResourceInfo cri : serviceFactory.getClassResourceInfo()) {
             if (cri.getResourceProvider() != null) {
                 continue;
             }
-            
+
             ResourceProvider rp = resourceProviders.get(cri.getResourceClass());
             if (rp != null) {
                 cri.setResourceProvider(rp);
             } else {
-                setDefaultResourceProvider(cri);  
+                setDefaultResourceProvider(cri);
             }
         }
         injectContexts();
@@ -441,7 +441,7 @@ public class JAXRSServerFactoryBean extends AbstractJAXRSFactoryBean {
     protected void setDefaultResourceProvider(ClassResourceInfo cri) {
         cri.setResourceProvider(new PerRequestResourceProvider(cri.getResourceClass()));
     }
-    
+
     /**
      * Set the reference to the document (WADL, etc) describing the endpoint
      * @param documentLocation document location

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
index 576fc20..70a3871 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
@@ -49,17 +49,17 @@ import org.apache.cxf.service.invoker.Invoker;
  * Builds a JAX-RS service model from resource classes.
  */
 public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
-    
-    protected List<ClassResourceInfo> classResourceInfos = 
+
+    protected List<ClassResourceInfo> classResourceInfos =
         new ArrayList<>();
-    
+
     private Invoker invoker;
     private Executor executor;
     private boolean enableStatic;
     private QName serviceName;
 
     private Class<?> defaultModelClass;
-    
+
     public JAXRSServiceFactoryBean() {
     }
 
@@ -73,19 +73,19 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
             super.setBus(bus);
         }
     }
-    
+
     public void setServiceName(QName name) {
         this.serviceName = name;
     }
-    
+
     public QName getServiceName() {
         return serviceName;
     }
-    
+
     public void setEnableStaticResolution(boolean staticResolution) {
         this.enableStatic = staticResolution;
     }
-    
+
     @Override
     public Service create() {
         sendEvent(Event.START_CREATE);
@@ -139,11 +139,11 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
     public List<ClassResourceInfo> getClassResourceInfo() {
         return Collections.unmodifiableList(classResourceInfos);
     }
-    
+
     List<ClassResourceInfo> getRealClassResourceInfo() {
         return classResourceInfos;
     }
-    
+
     public void setResourceClass(Class<?> cls) {
         if (getCreatedFromModel(cls) == null) {
             classResourceInfos.clear();
@@ -151,10 +151,10 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
             createResourceInfo(cls, isRoot);
         }
     }
-    
+
     public void setResourceClasses(List<Class<?>> classes) {
         for (Class<?> resourceClass : classes) {
-            
+
             ClassResourceInfo cri = getCreatedFromModel(resourceClass);
             if (cri != null) {
                 if (!InjectionUtils.isConcreteClass(cri.getServiceClass())) {
@@ -164,18 +164,18 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
                 }
                 continue;
             }
-            
+
             createResourceInfo(resourceClass, true);
         }
     }
-    
+
     public void setUserResources(List<UserResource> resources) {
         Map<String, UserResource> map = userResourcesAsMap(resources);
         for (UserResource ur : resources) {
             if (ur.getPath() != null) {
-                ClassResourceInfo cri = ResourceUtils.createClassResourceInfo(map, ur, 
-                                                                              defaultModelClass, 
-                                                                              true, 
+                ClassResourceInfo cri = ResourceUtils.createClassResourceInfo(map, ur,
+                                                                              defaultModelClass,
+                                                                              true,
                                                                               enableStatic,
                                                                               getBus());
                 if (cri != null) {
@@ -184,7 +184,7 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
             }
         }
     }
-    
+
     public void setUserResourcesWithServiceClass(List<UserResource> resources, Class<?> ...sClasses) {
         Map<String, UserResource> map = userResourcesAsMap(resources);
         for (Class<?> sClass : sClasses) {
@@ -195,7 +195,7 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
             }
         }
     }
-    
+
     private Map<String, UserResource> userResourcesAsMap(List<UserResource> resources) {
         Map<String, UserResource> map = new HashMap<String, UserResource>();
         for (UserResource ur : resources) {
@@ -203,9 +203,9 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
         }
         return map;
     }
-    
+
     protected ClassResourceInfo createResourceInfo(Class<?> cls, boolean isRoot) {
-        ClassResourceInfo classResourceInfo = 
+        ClassResourceInfo classResourceInfo =
             ResourceUtils.createClassResourceInfo(cls, cls, isRoot, enableStatic, getBus());
         if (classResourceInfo != null) {
             classResourceInfos.add(classResourceInfo);
@@ -216,12 +216,12 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
     public void setResourceClasses(Class<?>... classes) {
         setResourceClasses(Arrays.asList(classes));
     }
-    
+
     public void setResourceClassesFromBeans(List<Object> beans) {
         for (Object bean : beans) {
-            
+
             Class<?> realClass = ClassHelper.getRealClass(getBus(), bean);
-            
+
             ClassResourceInfo cri = getCreatedFromModel(realClass);
             if (cri != null) {
                 if (!InjectionUtils.isConcreteClass(cri.getServiceClass())) {
@@ -232,7 +232,7 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
                 cri.setResourceProvider(new SingletonResourceProvider(bean));
                 continue;
             }
-            
+
             cri = ResourceUtils.createClassResourceInfo(bean.getClass(), realClass, true, enableStatic,
                                                         getBus());
             if (cri != null) {
@@ -242,21 +242,21 @@ public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
             }
         }
     }
-    
+
     private ClassResourceInfo getCreatedFromModel(Class<?> realClass) {
         sendEvent(Event.CREATE_FROM_CLASS, realClass);
 
         for (ClassResourceInfo cri : classResourceInfos) {
-            if (cri.isCreatedFromModel() 
+            if (cri.isCreatedFromModel()
                 && cri.isRoot() && cri.getServiceClass().isAssignableFrom(realClass)) {
                 return cri;
             }
         }
         return null;
     }
-    
+
     protected void initializeServiceModel() {
-        
+
         JAXRSServiceImpl service = new JAXRSServiceImpl(classResourceInfos, serviceName);
 
         setService(service);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java
index ecd6cdb..e4c22cb 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java
@@ -52,7 +52,7 @@ import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 
 /**
- * The CXF Service implementation which is used 
+ * The CXF Service implementation which is used
  * to register the JAX-RS endpoint with the runtime.
  */
 public class JAXRSServiceImpl extends AbstractAttributedInterceptorProvider implements Service, Configurable {
@@ -65,7 +65,7 @@ public class JAXRSServiceImpl extends AbstractAttributedInterceptorProvider impl
     private String address;
     private boolean createServiceModel;
     private QName serviceName;
-    
+
     public JAXRSServiceImpl(String address, QName qname) {
         this.address = address;
         this.serviceName = qname;
@@ -75,20 +75,20 @@ public class JAXRSServiceImpl extends AbstractAttributedInterceptorProvider impl
         this.classResourceInfos = cri;
         this.serviceName = qname;
     }
-    
+
     public JAXRSServiceImpl(List<ClassResourceInfo> cri) {
         this(cri, null);
     }
-    
+
     public JAXRSServiceImpl(List<ClassResourceInfo> cri, boolean create) {
         this(cri, null);
         createServiceModel = true;
     }
-    
+
     public void setCreateServiceModel(boolean create) {
         createServiceModel = create;
     }
-    
+
     public String getBeanName() {
         return getName().toString();
     }
@@ -109,18 +109,18 @@ public class JAXRSServiceImpl extends AbstractAttributedInterceptorProvider impl
     public List<ClassResourceInfo> getClassResourceInfos() {
         return classResourceInfos;
     }
-    
+
     public List<ServiceInfo> getServiceInfos() {
         if (!createServiceModel) {
             return Collections.emptyList();
         }
         // try to convert to WSDL-centric model so that CXF DataBindings can get initialized
         // might become useful too if we support wsdl2
-        
-        // make databindings to use databinding-specific information 
+
+        // make databindings to use databinding-specific information
         // like @XmlRootElement for ex to select a namespace
         this.put("org.apache.cxf.databinding.namespace", "true");
-        
+
         List<ServiceInfo> infos = new ArrayList<>();
         for (ClassResourceInfo cri : classResourceInfos) {
             ServiceInfo si = new ServiceInfo();
@@ -135,15 +135,15 @@ public class JAXRSServiceImpl extends AbstractAttributedInterceptorProvider impl
                 OperationInfo oi = inf.addOperation(oname);
                 createMessagePartInfo(oi, m.getReturnType(), qname, m, false);
                 for (Parameter pm : ori.getParameters()) {
-                    
+
                     if (pm.getType() == ParameterType.REQUEST_BODY) {
-                        createMessagePartInfo(oi, 
+                        createMessagePartInfo(oi,
                                               ori.getMethodToInvoke().getParameterTypes()[pm.getIndex()],
-                                              qname, m, true);    
+                                              qname, m, true);
                     }
                 }
             }
-            
+
         }
         return infos;
     }
@@ -156,9 +156,9 @@ public class JAXRSServiceImpl extends AbstractAttributedInterceptorProvider impl
         if (InjectionUtils.isPrimitive(type) || Response.class == type) {
             return;
         }
-        QName mName = new QName(qname.getNamespaceURI(), 
+        QName mName = new QName(qname.getNamespaceURI(),
                                 (input ? "in" : "out") + m.getName());
-        MessageInfo ms = oi.createMessage(mName, 
+        MessageInfo ms = oi.createMessage(mName,
                                            input ? MessageInfo.Type.INPUT : MessageInfo.Type.OUTPUT);
         if (input) {
             oi.setInput("in", ms);
@@ -171,13 +171,13 @@ public class JAXRSServiceImpl extends AbstractAttributedInterceptorProvider impl
         mpi.setTypeQName(mpQName);
         mpi.setTypeClass(type);
     }
-    
-    public EndpointInfo getEndpointInfo(QName endpoint) {        
+
+    public EndpointInfo getEndpointInfo(QName endpoint) {
         // For WSDL-based services, this is to construct an EndpointInfo
         // (transport, binding, address etc) from WSDL's physical part.
         // not applicable to JAX-RS services.
         return null;
-    }    
+    }
 
     public Executor getExecutor() {
         return executor;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java
index 5b2350c..621a9b9 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java
@@ -69,7 +69,7 @@ public class BlueprintResourceFactory implements ResourceProvider {
         Object component = blueprintContainer.getComponentMetadata(beanId);
         if (component instanceof BeanMetadata) {
             BeanMetadata local = (BeanMetadata) component;
-            isSingleton = BeanMetadata.SCOPE_SINGLETON.equals(local.getScope())  
+            isSingleton = BeanMetadata.SCOPE_SINGLETON.equals(local.getScope())
                 || (local.getScope() == null && local.getId() != null);
         }
     }
@@ -78,11 +78,11 @@ public class BlueprintResourceFactory implements ResourceProvider {
         //TODO -- This is not the BP way.
         ProviderInfo<?> application = m == null ? null
             : (ProviderInfo<?>)m.getExchange().getEndpoint().get(Application.class.getName());
-        Map<Class<?>, Object> mapValues = CastUtils.cast(application == null ? null 
+        Map<Class<?>, Object> mapValues = CastUtils.cast(application == null ? null
             : Collections.singletonMap(Application.class, application.getProvider()));
         Object[] values = ResourceUtils.createConstructorArguments(c, m, !isSingleton(), mapValues);
         //TODO Very springish...
-        Object instance = values.length > 0 ? blueprintContainer.getComponentInstance(beanId) 
+        Object instance = values.length > 0 ? blueprintContainer.getComponentInstance(beanId)
             : blueprintContainer.getComponentInstance(beanId);
         if (!isSingleton() || m == null) {
             InjectionUtils.invokeLifeCycleMethod(instance, postConstructMethod);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
index ea2f919..d9d329a 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
@@ -42,10 +42,10 @@ import org.osgi.service.blueprint.reflect.Metadata;
 @Namespaces("http://cxf.apache.org/blueprint/jaxrs")
 public class JAXRSBPNamespaceHandler extends BaseNamespaceHandler {
     private BlueprintContainer blueprintContainer;
-    
+
     public JAXRSBPNamespaceHandler() {
     }
-    
+
     public URL getSchemaLocation(String namespace) {
         if ("http://cxf.apache.org/blueprint/jaxrs".equals(namespace)
                 || "http://cxf.apache.org/schemas/jaxrs.xsd".equals(namespace)) {
@@ -75,13 +75,13 @@ public class JAXRSBPNamespaceHandler extends BaseNamespaceHandler {
     public ComponentMetadata decorate(Node node, ComponentMetadata component, ParserContext context) {
         return null;
     }
-    
+
     private Element transformElement(Element element) {
-        final Map<String, String> transformMap = 
-            Collections.singletonMap("{" + element.getNamespaceURI() + "}*", 
+        final Map<String, String> transformMap =
+            Collections.singletonMap("{" + element.getNamespaceURI() + "}*",
                                      "{http://cxf.apache.org/blueprint/jaxrs-client}*");
-        
-        
+
+
         W3CDOMStreamWriter domWriter = new W3CDOMStreamWriter();
         OutTransformWriter transformWriter = new OutTransformWriter(domWriter, transformMap);
         try {
@@ -98,5 +98,5 @@ public class JAXRSBPNamespaceHandler extends BaseNamespaceHandler {
     public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
         this.blueprintContainer = blueprintContainer;
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java
index 41f0e39..cb097e8 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java
@@ -41,13 +41,13 @@ import org.osgi.service.blueprint.reflect.Metadata;
 
 
 public class JAXRSServerFactoryBeanDefinitionParser extends SimpleBPBeanDefinitionParser {
-    
+
     public JAXRSServerFactoryBeanDefinitionParser() {
         super(JAXRSServerFactoryBean.class);
     }
     @Override
-    protected void mapAttribute(MutableBeanMetadata bean, 
-                                Element e, String name, 
+    protected void mapAttribute(MutableBeanMetadata bean,
+                                Element e, String name,
                                 String val, ParserContext context) {
         if ("beanNames".equals(name)) {
             String[] values = StringUtils.split(val, " ");
@@ -69,7 +69,7 @@ public class JAXRSServerFactoryBeanDefinitionParser extends SimpleBPBeanDefiniti
                     tempFactories.addValue(resourceBean);
                 }
             }
-            bean.addProperty("tempFactories", tempFactories); 
+            bean.addProperty("tempFactories", tempFactories);
         } else if ("serviceName".equals(name)) {
             QName q = parseQName(e, val);
             bean.addProperty(name, createValue(context, q));
@@ -82,7 +82,7 @@ public class JAXRSServerFactoryBeanDefinitionParser extends SimpleBPBeanDefiniti
 
     @Override
     protected void mapElement(ParserContext ctx, MutableBeanMetadata bean, Element el, String name) {
-        if ("properties".equals(name) 
+        if ("properties".equals(name)
             || "extensionMappings".equals(name)
             || "languageMappings".equals(name)) {
             bean.addProperty(name, this.parseMapData(ctx, bean, el));
@@ -95,7 +95,7 @@ public class JAXRSServerFactoryBeanDefinitionParser extends SimpleBPBeanDefiniti
         } else if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name)
             || "outInterceptors".equals(name) || "outFaultInterceptors".equals(name)) {
             bean.addProperty(name, this.parseListData(ctx, bean, el));
-        } else if ("features".equals(name) || "schemaLocations".equals(name) 
+        } else if ("features".equals(name) || "schemaLocations".equals(name)
             || "providers".equals(name) || "serviceBeans".equals(name)
             || "modelBeans".equals(name)) {
             bean.addProperty(name, this.parseListData(ctx, bean, el));
@@ -125,10 +125,10 @@ public class JAXRSServerFactoryBeanDefinitionParser extends SimpleBPBeanDefiniti
             }
             bean.addProperty("modelBeans", list);
         } else {
-            setFirstChildAsProperty(el, ctx, bean, name);            
-        }        
+            setFirstChildAsProperty(el, ctx, bean, name);
+        }
     }
-    
+
 
     @Override
     public Metadata parse(Element element, ParserContext context) {
@@ -145,7 +145,7 @@ public class JAXRSServerFactoryBeanDefinitionParser extends SimpleBPBeanDefiniti
     protected boolean hasBusProperty() {
         return true;
     }
-    
+
     public static class PassThroughCallable<T> implements Callable<T> {
 
         private T value;
@@ -168,7 +168,7 @@ public class JAXRSServerFactoryBeanDefinitionParser extends SimpleBPBeanDefiniti
         }
         return resources;
     }
-    
+
     private static String getResourceClassFromElement(Element e) {
         return e.getAttribute("name");
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java
index 8078215..b9b5bb5 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java
@@ -34,24 +34,24 @@ import javax.ws.rs.ext.Providers;
  *
  */
 public interface MessageContext {
-    
+
     Object get(Object key);
     Object getContextualProperty(Object key);
     <T> T getContent(Class<T> format);
-    
+
     void put(Object key, Object value);
-    
+
     UriInfo getUriInfo();
     Request getRequest();
     HttpHeaders getHttpHeaders();
     SecurityContext getSecurityContext();
     Providers getProviders();
-    
-    HttpServletRequest getHttpServletRequest(); 
+
+    HttpServletRequest getHttpServletRequest();
     HttpServletResponse getHttpServletResponse();
     ServletContext getServletContext();
     ServletConfig getServletConfig();
-    
+
     <T> T getContext(Class<T> contextClass);
     <T, E> T getResolver(Class<T> resolverClass, Class<E> resolveClazz);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
index a1ec581..270bcdc 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
@@ -68,7 +68,7 @@ public class MessageContextImpl implements MessageContext {
     public MessageContextImpl(Message m) {
         this.m = m;
     }
-    
+
     public Object get(Object key) {
         String keyValue = key.toString();
         if (MultipartBody.INBOUND_MESSAGE_ATTACHMENTS.equals(keyValue)
@@ -83,7 +83,7 @@ public class MessageContextImpl implements MessageContext {
         if (keyValue.equals("WRITE-" + Message.ATTACHMENTS)) {
             return m.getExchange().getOutMessage().get(Message.ATTACHMENTS);
         }
-        
+
         Message currentMessage = getCurrentMessage();
         Object value = currentMessage.get(key);
         if (value == null) {
@@ -92,7 +92,7 @@ public class MessageContextImpl implements MessageContext {
             }
             Exchange exchange = currentMessage.getExchange();
             if (exchange != null) {
-                Message otherMessage = exchange.getInMessage() == currentMessage 
+                Message otherMessage = exchange.getInMessage() == currentMessage
                     ? exchange.getOutMessage() : exchange.getInMessage();
                 if (otherMessage != null) {
                     value = otherMessage.get(key);
@@ -101,10 +101,10 @@ public class MessageContextImpl implements MessageContext {
                     value = m.getExchange().get(key);
                 }
             }
-        } 
+        }
         return value;
     }
-    
+
     private Message getCurrentMessage() {
         Message currentMessage = JAXRSUtils.getCurrentMessage();
         if (currentMessage == null) {
@@ -117,10 +117,10 @@ public class MessageContextImpl implements MessageContext {
         if (MessageUtils.isRequestor(m) && m.getExchange().getInMessage() != null) {
             Message inMessage = m.getExchange().getInMessage();
             return inMessage.getContent(format);
-        } 
+        }
         return m.getContent(format);
     }
-    
+
     public Object getContextualProperty(Object key) {
         Object value = m.getContextualProperty(key.toString());
         if (value == null && key.getClass() == Class.class) {
@@ -133,22 +133,22 @@ public class MessageContextImpl implements MessageContext {
     public <T> T getContext(Class<T> contextClass) {
         return getContext(contextClass, contextClass);
     }
-    
+
     protected <T> T getContext(Type genericType, Class<T> clazz) {
         return JAXRSUtils.createContextValue(m, genericType, clazz);
     }
-    
+
     public <T, E> T getResolver(Class<T> resolverClazz, Class<E> resolveClazz) {
         if (ContextResolver.class == resolverClazz) {
             return resolverClazz.cast(getContext(resolveClazz, ContextResolver.class));
         }
         return null;
     }
-    
+
     public Request getRequest() {
         return getContext(Request.class);
     }
-    
+
     public HttpHeaders getHttpHeaders() {
         return getContext(HttpHeaders.class);
     }
@@ -164,7 +164,7 @@ public class MessageContextImpl implements MessageContext {
     public UriInfo getUriInfo() {
         return getContext(UriInfo.class);
     }
-    
+
     public HttpServletRequest getHttpServletRequest() {
         try {
             return getContext(HttpServletRequest.class);
@@ -176,7 +176,7 @@ public class MessageContextImpl implements MessageContext {
     public HttpServletResponse getHttpServletResponse() {
         return getContext(HttpServletResponse.class);
     }
-    
+
     public ServletConfig getServletConfig() {
         return getContext(ServletConfig.class);
     }
@@ -192,14 +192,14 @@ public class MessageContextImpl implements MessageContext {
         Message currentMessage = getCurrentMessage();
         currentMessage.put(key.toString(), value);
         currentMessage.getExchange().put(key.toString(), value);
-            
+
     }
 
     private void convertToAttachments(Object value) {
         List<?> handlers = (List<?>)value;
-        List<org.apache.cxf.message.Attachment> atts = 
+        List<org.apache.cxf.message.Attachment> atts =
             new ArrayList<org.apache.cxf.message.Attachment>();
-        
+
         for (int i = 1; i < handlers.size(); i++) {
             Attachment handler = (Attachment)handlers.get(i);
             AttachmentImpl att = new AttachmentImpl(handler.getContentId(), handler.getDataHandler());
@@ -213,32 +213,32 @@ public class MessageContextImpl implements MessageContext {
         outMessage.setAttachments(atts);
         outMessage.put(AttachmentOutInterceptor.WRITE_ATTACHMENTS, "true");
         Attachment root = (Attachment)handlers.get(0);
-        
+
         String rootContentType = root.getContentType().toString();
         MultivaluedMap<String, String> rootHeaders = new MetadataMap<String, String>(root.getHeaders());
         if (!AttachmentUtil.isMtomEnabled(outMessage)) {
             rootHeaders.putSingle(Message.CONTENT_TYPE, rootContentType);
         }
-        
+
         String messageContentType = outMessage.get(Message.CONTENT_TYPE).toString();
         int index = messageContentType.indexOf(";type");
         if (index > 0) {
             messageContentType = messageContentType.substring(0, index).trim();
         }
-        AttachmentOutputInterceptor attInterceptor =          
+        AttachmentOutputInterceptor attInterceptor =
             new AttachmentOutputInterceptor(messageContentType, rootHeaders);
-        
+
         outMessage.put(Message.CONTENT_TYPE, rootContentType);
-        Map<String, List<String>> allHeaders = 
+        Map<String, List<String>> allHeaders =
             CastUtils.cast((Map<?, ?>)outMessage.get(Message.PROTOCOL_HEADERS));
         if (allHeaders != null) {
             allHeaders.remove(Message.CONTENT_TYPE);
         }
         attInterceptor.handleMessage(outMessage);
     }
-    
+
     private Message getOutMessage() {
-        
+
         Message message = m.getExchange().getOutMessage();
         if (message == null) {
             Endpoint ep = m.getExchange().getEndpoint();
@@ -247,51 +247,51 @@ public class MessageContextImpl implements MessageContext {
             message = ep.getBinding().createMessage(message);
             m.getExchange().setOutMessage(message);
         }
-        
+
         return message;
     }
-    
+
     private MultipartBody createAttachments(String propertyName) {
         Message inMessage = m.getExchange().getInMessage();
         boolean embeddedAttachment = inMessage.get("org.apache.cxf.multipart.embedded") != null;
-        
+
         Object o = inMessage.get(propertyName);
         if (o != null) {
             return (MultipartBody)o;
         }
-        
+
         if (embeddedAttachment) {
             inMessage = new MessageImpl();
             inMessage.setExchange(new ExchangeImpl());
-            inMessage.put(AttachmentDeserializer.ATTACHMENT_DIRECTORY, 
+            inMessage.put(AttachmentDeserializer.ATTACHMENT_DIRECTORY,
                 m.getExchange().getInMessage().get(AttachmentDeserializer.ATTACHMENT_DIRECTORY));
-            inMessage.put(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD, 
+            inMessage.put(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD,
                 m.getExchange().getInMessage().get(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD));
             inMessage.put(AttachmentDeserializer.ATTACHMENT_MAX_SIZE,
                 m.getExchange().getInMessage().get(AttachmentDeserializer.ATTACHMENT_MAX_SIZE));
-            inMessage.setContent(InputStream.class, 
+            inMessage.setContent(InputStream.class,
                 m.getExchange().getInMessage().get("org.apache.cxf.multipart.embedded.input"));
-            inMessage.put(Message.CONTENT_TYPE, 
+            inMessage.put(Message.CONTENT_TYPE,
                 m.getExchange().getInMessage().get("org.apache.cxf.multipart.embedded.ctype").toString());
         }
-        
-        
+
+
         new AttachmentInputInterceptor().handleMessage(inMessage);
-    
+
         List<Attachment> newAttachments = new LinkedList<Attachment>();
         try {
-            Map<String, List<String>> headers 
+            Map<String, List<String>> headers
                 = CastUtils.cast((Map<?, ?>)inMessage.get(AttachmentDeserializer.ATTACHMENT_PART_HEADERS));
             Attachment first = new Attachment(AttachmentUtil.createAttachment(
-                                     inMessage.getContent(InputStream.class), 
+                                     inMessage.getContent(InputStream.class),
                                      headers),
                                      new ProvidersImpl(inMessage));
             newAttachments.add(first);
         } catch (IOException ex) {
             throw ExceptionUtils.toInternalServerErrorException(ex, null);
         }
-        
-    
+
+
         Collection<org.apache.cxf.message.Attachment> childAttachments = inMessage.getAttachments();
         if (childAttachments == null) {
             childAttachments = Collections.emptyList();
@@ -300,12 +300,12 @@ public class MessageContextImpl implements MessageContext {
         for (org.apache.cxf.message.Attachment a : childAttachments) {
             newAttachments.add(new Attachment(a, new ProvidersImpl(inMessage)));
         }
-        MediaType mt = embeddedAttachment 
+        MediaType mt = embeddedAttachment
             ? (MediaType)inMessage.get("org.apache.cxf.multipart.embedded.ctype")
             : getHttpHeaders().getMediaType();
         MultipartBody body = new MultipartBody(newAttachments, mt, false);
         inMessage.put(propertyName, body);
         return body;
     }
-       
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Nullable.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Nullable.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Nullable.java
index 4d5febc..34c6480 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Nullable.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Nullable.java
@@ -28,9 +28,9 @@ import java.lang.annotation.Target;
  * Some JAX-RS providers, notably JAXB-based ones
  * return 400 when the incoming payload is empty.
  * This annotation can be attached to a method parameter
- * identifying a request body in order to get a null 
- * injected instead  
- * 
+ * identifying a request body in order to get a null
+ * injected instead
+ *
  */
 @Target({ElementType.PARAMETER, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Oneway.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Oneway.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Oneway.java
index bd0e3f1..e286d1d 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Oneway.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Oneway.java
@@ -26,7 +26,7 @@ import java.lang.annotation.Target;
 
 /**
  * Can be used to nominate oneway methods
- * 
+ *
  */
 @Target(ElementType.METHOD)
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeaders.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeaders.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeaders.java
index 366c77f..e9ad7a2 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeaders.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeaders.java
@@ -27,26 +27,26 @@ import javax.ws.rs.core.MultivaluedMap;
  *
  */
 public interface ProtocolHeaders {
-    
+
     /**
      * Get the value of a request header.
      * @param name the header name, case insensitive
      * @return the header value
      */
     String getRequestHeaderValue(String name);
-    
+
     /**
      * Get the values of a request header.
      * @param name the header name, case insensitive
      * @return a read-only list of header values.
      */
     List<String> getRequestHeader(String name);
-    
+
     /**
-     * Get the values of request headers. 
+     * Get the values of request headers.
      * @return a read-only map of header names and values.
      */
     MultivaluedMap<String, String> getRequestHeaders();
-    
-    
+
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeadersImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeadersImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeadersImpl.java
index ef94feb..697341a 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeadersImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ProtocolHeadersImpl.java
@@ -31,11 +31,11 @@ public class ProtocolHeadersImpl implements ProtocolHeaders {
     // ProtocolHeaderImpl and HttpHeadersImpl inheriting from it given that
     // HttpHeadersImpl is just a wrapper around Message.PROTOCOL_HEADERS
     private HttpHeadersImpl httpHeaders;
-    
+
     public ProtocolHeadersImpl(Message m) {
         httpHeaders = new HttpHeadersImpl(m);
     }
-    
+
     public List<String> getRequestHeader(String name) {
         return httpHeaders.getRequestHeader(name);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResourceComparator.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResourceComparator.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResourceComparator.java
index efe263c..1404ed2 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResourceComparator.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResourceComparator.java
@@ -24,7 +24,7 @@ import org.apache.cxf.message.Message;
 
 /**
  * Can be used to affect the way the JAXRS selection algorithm chooses
- * between multiple matching resource classes and methods 
+ * between multiple matching resource classes and methods
  *
  */
 public interface ResourceComparator {
@@ -34,20 +34,20 @@ public interface ResourceComparator {
      * @param cri1 First resource class
      * @param cri2 Second resource class
      * @param message incoming message
-     * @return -1 if cri1 < cri2, 1 if if cri1 > cri2, 0 otherwise 
+     * @return -1 if cri1 < cri2, 1 if if cri1 > cri2, 0 otherwise
      */
-    int compare(ClassResourceInfo cri1, 
+    int compare(ClassResourceInfo cri1,
                 ClassResourceInfo cri2,
                 Message message);
-    
+
     /**
      * Compares two resource methods
      * @param oper1 First resource method
      * @param oper2 Second resource method
      * @param message incoming message
-     * @return -1 if oper1 < oper2, 1 if if oper1 > oper2, 0 otherwise 
+     * @return -1 if oper1 < oper2, 1 if if oper1 > oper2, 0 otherwise
      */
-    int compare(OperationResourceInfo oper1, 
+    int compare(OperationResourceInfo oper1,
                 OperationResourceInfo oper2,
                 Message message);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java
index 58b37b8..ca095d0 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java
@@ -39,21 +39,21 @@ import org.apache.cxf.jaxrs.utils.ExceptionUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 
 /**
- * This class represents an attachment; generally a multipart part. 
+ * This class represents an attachment; generally a multipart part.
  * Some constructors in here are intended only for
- * internal use in CXF, others are suitable or preparing 
- * attachments to pass to the {@link org.apache.cxf.jaxrs.client.WebClient} API. 
- * See the {@link AttachmentBuilder} for a convenient 
+ * internal use in CXF, others are suitable or preparing
+ * attachments to pass to the {@link org.apache.cxf.jaxrs.client.WebClient} API.
+ * See the {@link AttachmentBuilder} for a convenient
  * way to create attachments for use with {@link org.apache.cxf.jaxrs.client.WebClient}.
  */
 public class Attachment implements Transferable {
-    
+
     private DataHandler handler;
-    private MultivaluedMap<String, String> headers = 
+    private MultivaluedMap<String, String> headers =
         new MetadataMap<String, String>(false, true);
     private Object object;
     private Providers providers;
-    
+
     public Attachment(org.apache.cxf.message.Attachment a,
                       Providers providers) {
         handler = a.getDataHandler();
@@ -67,34 +67,34 @@ public class Attachment implements Transferable {
         headers.putSingle("Content-ID", a.getId());
         this.providers = providers;
     }
-    
+
     public Attachment(String id, DataHandler dh, MultivaluedMap<String, String> headers) {
         handler = dh;
         this.headers = new MetadataMap<String, String>(headers, false, true);
         this.headers.putSingle("Content-ID", id);
     }
-    
+
     public Attachment(String id, DataSource ds, MultivaluedMap<String, String> headers) {
         this(id, new DataHandler(ds), headers);
     }
-    
+
     public Attachment(MultivaluedMap<String, String> headers, Object object) {
         this.headers = headers;
         this.object = object;
     }
-    
+
     public Attachment(InputStream is, MultivaluedMap<String, String> headers) {
-        this(headers.getFirst("Content-ID"), 
-             new DataHandler(new InputStreamDataSource(is, headers.getFirst("Content-Type"))), 
+        this(headers.getFirst("Content-ID"),
+             new DataHandler(new InputStreamDataSource(is, headers.getFirst("Content-Type"))),
              headers);
     }
-    
+
     public Attachment(String id, String mediaType, Object object) {
         this.object = object;
         headers.putSingle("Content-ID", id);
         headers.putSingle("Content-Type", mediaType);
     }
-    
+
     public Attachment(String id, InputStream is, ContentDisposition cd) {
         handler = new DataHandler(new InputStreamDataSource(is, "application/octet-stream"));
         if (cd != null) {
@@ -103,16 +103,16 @@ public class Attachment implements Transferable {
         headers.putSingle("Content-ID", id);
         headers.putSingle("Content-Type", "application/octet-stream");
     }
-    
+
     Attachment(MultivaluedMap<String, String> headers, DataHandler handler, Object object) {
         this.headers = headers;
         this.handler = handler;
         this.object = object;
     }
-    
+
     public ContentDisposition getContentDisposition() {
         String header = getHeader("Content-Disposition");
-        
+
         return header == null ? null : new ContentDisposition(header);
     }
 
@@ -132,14 +132,14 @@ public class Attachment implements Transferable {
     public Object getObject() {
         return object;
     }
-    
+
     public <T> T getObject(Class<T> cls) {
         if (providers != null) {
-            MessageBodyReader<T> mbr = 
+            MessageBodyReader<T> mbr =
                 providers.getMessageBodyReader(cls, cls, new Annotation[]{}, getContentType());
             if (mbr != null) {
                 try {
-                    return mbr.readFrom(cls, cls, new Annotation[]{}, getContentType(), 
+                    return mbr.readFrom(cls, cls, new Annotation[]{}, getContentType(),
                                         headers, getDataHandler().getInputStream());
                 } catch (Exception ex) {
                     throw ExceptionUtils.toInternalServerErrorException(ex, null);
@@ -148,7 +148,7 @@ public class Attachment implements Transferable {
         }
         return null;
     }
-    
+
     public String getHeader(String name) {
         List<String> header = headers.get(name);
         if (header == null || header.size() == 0) {
@@ -163,7 +163,7 @@ public class Attachment implements Transferable {
         }
         return sb.toString();
     }
-    
+
     public List<String> getHeaderAsList(String name) {
         return headers.get(name);
     }
@@ -171,25 +171,25 @@ public class Attachment implements Transferable {
     public MultivaluedMap<String, String> getHeaders() {
         return new MetadataMap<String, String>(headers, false, true);
     }
-    
+
     public void transferTo(File destinationFile) throws IOException {
         IOUtils.transferTo(handler.getInputStream(), destinationFile);
     }
 
     @Override
     public int hashCode() {
-        return headers.hashCode(); 
+        return headers.hashCode();
     }
-    
+
     @Override
     public boolean equals(Object o) {
-        if (!(o instanceof Attachment)) { 
+        if (!(o instanceof Attachment)) {
             return false;
         }
-        
+
         Attachment other = (Attachment)o;
         return headers.equals(other.headers);
     }
-    
+
 
 }


Mime
View raw message