cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6726] Some non-primitive properties are lost during WADL generation, patch from Pengling Qian applied, This closes #56
Date Thu, 05 Mar 2015 23:02:25 GMT
Repository: cxf
Updated Branches:
  refs/heads/master e8e27511f -> 68447ebae


[CXF-6726] Some non-primitive properties are lost during WADL generation, patch from Pengling
Qian applied, This closes #56


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/68447eba
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/68447eba
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/68447eba

Branch: refs/heads/master
Commit: 68447ebae1043993ca2bc051b07b1a348bfefeee
Parents: e8e2751
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Mar 5 23:02:08 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Mar 5 23:02:08 2015 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java | 2 ++
 .../src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java | 4 ++++
 .../java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java  | 3 ++-
 3 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/68447eba/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index 2d02e42..cc0fcc4 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -779,6 +779,7 @@ public class WadlGenerator implements ContainerRequestFilter {
             List<Class<?>> parentBeanClasses = new LinkedList<Class<?>>();
             parentBeanClasses.add(type);
             doWriteBeanParam(ori, sb, type, pm, null, parentBeanClasses, isJson);
+            parentBeanClasses.remove(type);
         } 
     }
     private void doWriteJaxrsBeanParams(StringBuilder sb, 
@@ -851,6 +852,7 @@ public class WadlGenerator implements ContainerRequestFilter {
             } else if (!parentBeanClasses.contains(paramCls)) {
                 parentBeanClasses.add(paramCls);
                 doWriteBeanParam(ori, sb, paramCls, entry.getKey(), name, parentBeanClasses,
isJson);
+                parentBeanClasses.remove(paramCls);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/68447eba/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
index 8ff129e..46d26c2 100644
--- a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
+++ b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
@@ -236,6 +236,10 @@ public class BookStore implements BookDescription {
         public QueryBean3 getD() {
             return bean;
         }
+
+        public QueryBean3 getD2() {
+            return bean;
+        }
         
         public QueryBean2 getIt() {
             return this;

http://git-wip-us.apache.org/repos/asf/cxf/blob/68447eba/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
index 82c766f..75ca099 100644
--- a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
+++ b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
@@ -590,12 +590,13 @@ public class WadlGeneratorTest extends Assert {
         List<Element> requestEls = getElements(methodEl, "request", 1);
         
         // 6 parameters are expected
-        verifyParameters(requestEls.get(0), 6,
+        verifyParameters(requestEls.get(0), 7,
                          new Param("b", "query", "xs:int"),
                          new Param("aProp", "query", "xs:int"),
                          new Param("c.a", "query", "xs:int"),
                          new Param("c.b", "query", "xs:int"),
                          new Param("c.d.a", "query", "xs:boolean"),
+                         new Param("c.d2.a", "query", "xs:boolean"),
                          new Param("e", "query", "xs:string", Collections.singleton("A")));
         
         assertEquals(0, DOMUtils.getChildrenWithName(requestEls.get(0), 


Mime
View raw message