cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1292807 - in /cxf/branches/2.4.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 Thu, 23 Feb 2012 14:01:23 GMT
Author: sergeyb
Date: Thu Feb 23 14:01:23 2012
New Revision: 1292807

URL: http://svn.apache.org/viewvc?rev=1292807&view=rev
Log:
Merged revisions 1292793 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

................
  r1292793 | sergeyb | 2012-02-23 13:23:19 +0000 (Thu, 23 Feb 2012) | 9 lines
  
  Merged revisions 1292792 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1292792 | sergeyb | 2012-02-23 13:20:33 +0000 (Thu, 23 Feb 2012) | 1 line
    
    [CXF-4125] Updating WADLGenerator to keep the list of processed complex bean properties
  ........
................

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

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 23 14:01:23 2012
@@ -1,2 +1,2 @@
-/cxf/branches/2.5.x-fixes:1292050,1292373,1292766
-/cxf/trunk:1221366,1291943,1292763
+/cxf/branches/2.5.x-fixes:1292050,1292373,1292766,1292793
+/cxf/trunk:1221366,1291943,1292763,1292792

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

Modified: cxf/branches/2.4.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.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1292807&r1=1292806&r2=1292807&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Thu Feb 23 14:01:23 2012
@@ -544,11 +544,17 @@ public class WadlGenerator implements Re
             doWriteParam(sb, pm, type, method.getGenericParameterTypes()[pm.getIndex()],
                          pm.getName(), method.getParameterAnnotations()[pm.getIndex()]);
         } else {
-            doWriteBeanParam(sb, type, pm, null);
+            List<Class<?>> parentBeanClasses = new LinkedList<Class<?>>();
+            parentBeanClasses.add(type);
+            doWriteBeanParam(sb, type, pm, null, parentBeanClasses);
         }
     }
 
-    private void doWriteBeanParam(StringBuilder sb, Class<?> type, Parameter pm, String
parentName) {
+    private void doWriteBeanParam(StringBuilder sb, 
+                                  Class<?> type, 
+                                  Parameter pm, 
+                                  String parentName,
+                                  List<Class<?>> parentBeanClasses) {
         Map<Parameter, Class<?>> pms = InjectionUtils.getParametersFromBeanClass(type,
pm.getType(), true);
         for (Map.Entry<Parameter, Class<?>> entry : pms.entrySet()) {
             String name = entry.getKey().getName();
@@ -559,8 +565,9 @@ public class WadlGenerator implements Re
             boolean isPrimitive = InjectionUtils.isPrimitive(paramCls) || paramCls.isEnum();
             if (isPrimitive || InjectionUtils.isSupportedCollectionOrArray(paramCls)) {
                 doWriteParam(sb, entry.getKey(), paramCls, paramCls, name, new Annotation[]{});
-            } else {
-                doWriteBeanParam(sb, paramCls, entry.getKey(), name);
+            } else if (!parentBeanClasses.contains(paramCls)) {
+                parentBeanClasses.add(paramCls);
+                doWriteBeanParam(sb, paramCls, entry.getKey(), name, parentBeanClasses);
             }
         }
     }

Modified: cxf/branches/2.4.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.4.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java?rev=1292807&r1=1292806&r2=1292807&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
Thu Feb 23 14:01:23 2012
@@ -191,6 +191,9 @@ public class BookStore {
             return bean;
         }
         
+        public QueryBean2 getIt() {
+            return this;
+        }
     }
     
     public static class QueryBean3 {



Mime
View raw message