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:21:05 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 91c4d3019 -> b7dcd65f6


[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/b7dcd65f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b7dcd65f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b7dcd65f

Branch: refs/heads/3.0.x-fixes
Commit: b7dcd65f6ab258ec810c3a409d744ca46b53b6e4
Parents: 91c4d30
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:20:30 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/b7dcd65f/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