cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5988] Checking for Date when extracting values from parameter beans
Date Fri, 05 Sep 2014 21:19:42 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 21a099e9b -> 76461079c


[CXF-5988] Checking for Date when extracting values from parameter beans


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

Branch: refs/heads/master
Commit: 76461079ccac257f9b434042524bb2b4b1505bea
Parents: 21a099e
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Sep 5 22:19:10 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Sep 5 22:19:10 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/76461079/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
index 4b364ab..d59535f 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
@@ -38,6 +38,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
@@ -1179,7 +1180,7 @@ public final class InjectionUtils {
                 if (value == null) {
                     continue;
                 }
-                if (isPrimitive(value.getClass())) {
+                if (isPrimitive(value.getClass()) || Date.class.isAssignableFrom(value.getClass()))
{
                     values.putSingle(propertyName, value);
                 } else if (value.getClass().isEnum()) {
                     values.putSingle(propertyName, value.toString());


Mime
View raw message