cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1479634 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
Date Mon, 06 May 2013 16:39:22 GMT
Author: sergeyb
Date: Mon May  6 16:39:21 2013
New Revision: 1479634

URL: http://svn.apache.org/r1479634
Log:
[CXF-5000] Root-level NameBindings are missed if they are created from Application

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

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java?rev=1479634&r1=1479633&r2=1479634&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
Mon May  6 16:39:21 2013
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -100,8 +101,11 @@ public class JAXRSServerFactoryBean exte
      */
     public void setApplication(Application app) {
         appProvider = new ProviderInfo<Application>(app, getBus());
+        List<String> appNameBindings = AnnotationUtils.getNameBindings(app.getClass().getAnnotations());
         for (ClassResourceInfo cri : getServiceFactory().getClassResourceInfo()) {
-            cri.setNameBindings(AnnotationUtils.getNameBindings(app.getClass().getAnnotations()));
+            List<String> clsNameBindings = new LinkedList<String>(appNameBindings);
+            clsNameBindings.addAll(AnnotationUtils.getNameBindings(cri.getServiceClass().getAnnotations()));
+            cri.setNameBindings(clsNameBindings);
         }
     }
     



Mime
View raw message