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-6137] Treating Date as simple type
Date Fri, 05 Dec 2014 17:28:36 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 7aa0b1445 -> 0b8a12c3c


[CXF-6137] Treating Date as simple type


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

Branch: refs/heads/2.7.x-fixes
Commit: 0b8a12c3c89e2548a0b1252105c17c8a34e0fa7c
Parents: 7aa0b14
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Dec 5 17:18:31 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Dec 5 17:28:16 2014 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0b8a12c3/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index 67305b5..0eee57e 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -35,6 +35,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.IdentityHashMap;
@@ -760,7 +761,8 @@ public class WadlGenerator implements RequestHandler {
             }
             Class<?> paramCls = entry.getValue();
             boolean isPrimitive = InjectionUtils.isPrimitive(paramCls) || paramCls.isEnum();
-            if (isPrimitive || InjectionUtils.isSupportedCollectionOrArray(paramCls)) {
+            if (isPrimitive || Date.class.isAssignableFrom(paramCls)
+                || InjectionUtils.isSupportedCollectionOrArray(paramCls)) {
                 doWriteParam(sb, entry.getKey(), paramCls, paramCls, name, new Annotation[]
{}, isJson);
             } else if (!parentBeanClasses.contains(paramCls)) {
                 parentBeanClasses.add(paramCls);


Mime
View raw message