cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1422904 - in /cxf/branches/2.6.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
Date Mon, 17 Dec 2012 12:37:20 GMT
Author: sergeyb
Date: Mon Dec 17 12:37:20 2012
New Revision: 1422904

URL: http://svn.apache.org/viewvc?rev=1422904&view=rev
Log:
Merged revisions 1422898 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1422898 | sergeyb | 2012-12-17 12:26:12 +0000 (Mon, 17 Dec 2012) | 1 line
  
  [CXF-4702] Also adding an option to register all the providers in a list
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1422898

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java?rev=1422904&r1=1422903&r2=1422904&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
Mon Dec 17 12:37:20 2012
@@ -72,6 +72,7 @@ public final class ProviderFactory {
     
     private static final String JAXB_PROVIDER_NAME = "org.apache.cxf.jaxrs.provider.JAXBElementProvider";
     private static final String JSON_PROVIDER_NAME = "org.apache.cxf.jaxrs.provider.json.JSONProvider";
+    private static final String BUS_PROVIDERS_ALL = "org.apache.cxf.jaxrs.bus.providers";
     
     static {
         SHARED_FACTORY.setProviders(new BinaryDataProvider<Object>(),
@@ -496,13 +497,20 @@ public final class ProviderFactory {
         }
     }
     
+    
     private void addBusExtension(List<Object> extensions, Class<?>... extClasses)
{
         for (Class<?> extClass : extClasses) {
             Object ext = bus.getProperty(extClass.getName());
-            if (ext != null && extClass.isInstance(ext)) {
+            if (extClass.isInstance(ext)) {
                 extensions.add(ext);
             }
         }
+        Object allProp = bus.getProperty(BUS_PROVIDERS_ALL);
+        if (allProp instanceof List) {
+            @SuppressWarnings("unchecked")
+            List<Object> all = (List<Object>)allProp;
+            extensions.addAll(all);
+        }
     }
     
 //CHECKSTYLE:OFF       



Mime
View raw message