cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1309874 - in /cxf/branches/2.5.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Date Thu, 05 Apr 2012 14:18:45 GMT
Author: sergeyb
Date: Thu Apr  5 14:18:45 2012
New Revision: 1309874

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

........
  r1309871 | sergeyb | 2012-04-05 17:15:35 +0300 (Thu, 05 Apr 2012) | 1 line
  
  [CXF-4226] Minor update to WADLGenerator to check inherited class-level Description
........

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

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1309871

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

Modified: cxf/branches/2.5.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.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1309874&r1=1309873&r2=1309874&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Thu Apr  5 14:18:45 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