cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1422119 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
Date Fri, 14 Dec 2012 22:07:40 GMT
Author: sergeyb
Date: Fri Dec 14 22:07:38 2012
New Revision: 1422119

URL: http://svn.apache.org/viewvc?rev=1422119&view=rev
Log:
[CXF-4702] Minor optimization

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java?rev=1422119&r1=1422118&r2=1422119&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
Fri Dec 14 22:07:38 2012
@@ -670,12 +670,16 @@ public final class ProviderFactory {
     
     private void setBusProviders() {
         List<Object> extensions = new LinkedList<Object>(); 
-        addBusExtension(extensions,
-                        MessageBodyReader.class,
-                        MessageBodyWriter.class,
-                        ExceptionMapper.class);
-        if (!extensions.isEmpty()) {
-            setProviders(extensions.toArray());
+        final String alreadySetProp = "bus.providers.set";
+        if (bus.getProperty(alreadySetProp) == null) {
+            addBusExtension(extensions,
+                            MessageBodyReader.class,
+                            MessageBodyWriter.class,
+                            ExceptionMapper.class);
+            if (!extensions.isEmpty()) {
+                setProviders(extensions.toArray());
+                bus.setProperty(alreadySetProp, "");
+            }
         }
     }
     



Mime
View raw message