cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1525846 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
Date Tue, 24 Sep 2013 11:04:24 GMT
Author: sergeyb
Date: Tue Sep 24 11:04:24 2013
New Revision: 1525846

URL: http://svn.apache.org/r1525846
Log:
Merged revisions 1525841 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1525841 | sergeyb | 2013-09-24 11:51:52 +0100 (Tue, 24 Sep 2013) | 1 line
  
  [CXF-5289] WadlGenerator misses class-level Description annotations in some cases
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1525841

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

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1525846&r1=1525845&r2=1525846&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Tue Sep 24 11:04:24 2013
@@ -228,16 +228,13 @@ public class WadlGenerator implements Re
         Set<ClassResourceInfo> visitedResources = new LinkedHashSet<ClassResourceInfo>();
         for (ClassResourceInfo cri : cris) {
             startResourceTag(sbResources, cri.getServiceClass(), cri.getURITemplate().getValue());
-            Annotation[] anns = cri.getServiceClass().getAnnotations();
-            if (anns.length == 0) {
-                Annotation ann = AnnotationUtils.getClassAnnotation(cri.getServiceClass(),
Description.class);
-                if (ann != null) {
-                    anns = new Annotation[] {
-                        ann
-                    };
-                }
+            Annotation description = AnnotationUtils.getClassAnnotation(cri.getServiceClass(),
Description.class);
+            if (description == null) {
+                description = AnnotationUtils.getClassAnnotation(cri.getServiceClass(), Descriptions.class);
+            }
+            if (description != null) {
+                handleDocs(new Annotation[] {description}, sbResources, DocTarget.RESOURCE,
true, isJson);
             }
-            handleDocs(anns, sbResources, DocTarget.RESOURCE, true, isJson);
             handleResource(sbResources, allTypes, qnameResolver, clsMap, cri, visitedResources,
isJson);
             sbResources.append("</resource>");
         }

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java?rev=1525846&r1=1525845&r2=1525846&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
Tue Sep 24 11:04:24 2013
@@ -47,8 +47,7 @@ import org.apache.cxf.jaxrs.model.wadl.j
 @Path("/bookstore/{id}")
 @Consumes({"application/xml", "application/json" })
 @Produces({"application/xml", "application/json" })
-@Description(lang = "en-us", title = "book store \"resource\"", value = "super resource")
-public class BookStore {
+public class BookStore implements BookDescription {
 
     @Descriptions({ 
         @Description(value = "Attachments, max < 10", target = DocTarget.PARAM)



Mime
View raw message