cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1309871 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Date Thu, 05 Apr 2012 14:15:36 GMT
Author: sergeyb
Date: Thu Apr  5 14:15:35 2012
New Revision: 1309871

URL: http://svn.apache.org/viewvc?rev=1309871&view=rev
Log:
[CXF-4226] Minor update to WADLGenerator to check inherited class-level Description

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1309871&r1=1309870&r2=1309871&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Thu Apr  5 14:15:35 2012
@@ -223,7 +223,15 @@ public class WadlGenerator implements Re
         Set<ClassResourceInfo> visitedResources = new HashSet<ClassResourceInfo>();
         for (ClassResourceInfo cri : cris) {
             startResourceTag(sbResources, cri.getServiceClass(), cri.getURITemplate().getValue());
-            handleDocs(cri.getServiceClass().getAnnotations(), sbResources, DocTarget.RESOURCE,
true, isJson);
+            Annotation[] anns = cri.getServiceClass().getAnnotations();
+            if (anns.length == 0) {
+                Annotation ann = AnnotationUtils.getClassAnnotation(cri.getServiceClass(),

+                                                                    Description.class);
+                if (ann != null) {
+                    anns = new Annotation[] {ann};
+                }
+            }
+            handleDocs(anns, sbResources, DocTarget.RESOURCE, true, isJson);
             handleResource(sbResources, allTypes, qnameResolver, clsMap, cri, visitedResources,
isJson);
             sbResources.append("</resource>");
         }



Mime
View raw message