cxf-commits mailing list archives

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

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

................
  r1292807 | sergeyb | 2012-02-23 14:01:23 +0000 (Thu, 23 Feb 2012) | 16 lines
  
  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.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Feb 23 14:03:34 2012
@@ -0,0 +1,3 @@
+/cxf/branches/2.4.x-fixes:1292807
+/cxf/branches/2.5.x-fixes:1292793
+/cxf/trunk:1292792

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

Modified: cxf/branches/2.3.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.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1292808&r1=1292807&r2=1292808&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Thu Feb 23 14:03:34 2012
@@ -455,11 +455,17 @@ public class WadlGenerator implements Re
             doWriteParam(sb, pm, type, getMethod(ori).getGenericParameterTypes()[pm.getIndex()],
                          pm.getName());
         } 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();
@@ -470,8 +476,9 @@ public class WadlGenerator implements Re
             boolean isPrimitive = InjectionUtils.isPrimitive(paramCls);
             if (isPrimitive || InjectionUtils.isSupportedCollectionOrArray(paramCls)) {
                 doWriteParam(sb, entry.getKey(), paramCls, paramCls, name);
-            } 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.3.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.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java?rev=1292808&r1=1292807&r2=1292808&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
Thu Feb 23 14:03:34 2012
@@ -171,6 +171,9 @@ public class BookStore {
             return bean;
         }
         
+        public QueryBean2 getIt() {
+            return this;
+        }
     }
     
     public static class QueryBean3 {



Mime
View raw message