Issue #1871 fix for 64 bit ints from Python to Java
Change-Id: Ib4c6f04945514df602fbc5b3173b80ae010799ae Former-commit-id:bd64f70d1a
[formerly 73c05444468ee8a3d4efa73bdd5da9f5db1ab3f0] Former-commit-id:30c7ca8d36
This commit is contained in:
parent
183c1a589a
commit
ca208f913c
1 changed files with 4 additions and 2 deletions
|
@ -101,11 +101,13 @@ def pyDictToJavaMap(pyDict):
|
|||
def pyValToJavaObj(val):
|
||||
retObj = val
|
||||
valtype = type(val)
|
||||
if valtype is int:
|
||||
# since Python on 64 bit has larger ints, we need to do a check
|
||||
# for compatibility with Java Integers
|
||||
if valtype is int and val <= Integer.MAX_VALUE and val >= Integer.MIN_VALUE :
|
||||
retObj = Integer(val)
|
||||
elif valtype is float:
|
||||
retObj = Float(val)
|
||||
elif valtype is long:
|
||||
elif valtype is long or valtype is int:
|
||||
retObj = Long(val)
|
||||
elif valtype is bool:
|
||||
retObj = Boolean(val)
|
||||
|
|
Loading…
Add table
Reference in a new issue