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-7251] Checking for Integer when dealing with the Long property types
Date Thu, 16 Feb 2017 14:49:43 GMT
Repository: cxf
Updated Branches:
  refs/heads/master cf3f537d2 -> 265ac6e07


[CXF-7251] Checking for Integer when dealing with the Long property types


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

Branch: refs/heads/master
Commit: 265ac6e07cb17c02310b1931c09f03c48b6ca8c7
Parents: cf3f537
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Feb 16 14:49:28 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Feb 16 14:49:28 2017 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/265ac6e0/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
index 13d3cb6..e88a76f 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
@@ -552,7 +552,9 @@ public class ClientImpl implements Client {
         }
     }
     private static Long getLongValue(Object o) {
-        return o instanceof Long ? (Long)o : o instanceof String ? Long.valueOf(o.toString())
: null;
+        return o instanceof Long ? (Long)o 
+            : o instanceof String ? Long.valueOf(o.toString()) 
+            : o instanceof Integer ? ((Integer)o).longValue() : null;
     }
     private static Integer getIntValue(Object o) {
         return o instanceof Integer ? (Integer)o : o instanceof String ? Integer.valueOf(o.toString())
: null;


Mime
View raw message