Author: veithen
Date: Tue Oct  3 21:50:14 2017
New Revision: 1811033

URL: http://svn.apache.org/viewvc?rev=1811033&view=rev
Log:
Merge r1810603 to the 1.7 branch.

Modified:
    axis/axis2/java/core/branches/1_7/   (props changed)
    
axis/axis2/java/core/branches/1_7/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
    
axis/axis2/java/core/branches/1_7/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java

Propchange: axis/axis2/java/core/branches/1_7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct  3 21:50:14 2017
@@ -1,4 +1,4 @@
 /axis/axis2/java/core/branches/1_6:1295540
 /axis/axis2/java/core/branches/AXIOM-420:1334386-1336397
 
/axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
-/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1735795,1735801,1736512,1736543,1737030,1737567,1739001,1739186,1739343,1739346,1739348,1739493,1739592,1739594-1739595,1739815,1739826,1740693-1740694,1741976,1742201,1743824,1745826,1745860,1745869,1745875,1745912,1745924,1745929,1745941,1746001,1746028,1746109,1746782,1746784,1746787,1746813,1746842,1746880,1746883,1746889,1746894,1747448,1747466,1747503,1747575,1747578,1747601,1747773,1747920,1751057,1752039,1765132,1765183,1765188,1765193,1775081,1775102,1776253,1776585,1776594,1778204,1779069,1779074,1780290,1787632,1787676,1789029,1792353,1792376,1792650,1792655,1792802,1792804,1793723-1793724,1793728,1794114,1794192,1797821,1797823,1799068,1800495,1
 
803414,1805563,1806088,1806292,1806303-1806305,1806309,1806319,1806344,1806349-1806350,1806577,1806581,1806719,1807643,1807837,1807941,1807943,1808789,1809384-1809385,1809411,1809504,1809507,1809514,1809517,1810596,1810600
+/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1735795,1735801,1736512,1736543,1737030,1737567,1739001,1739186,1739343,1739346,1739348,1739493,1739592,1739594-1739595,1739815,1739826,1740693-1740694,1741976,1742201,1743824,1745826,1745860,1745869,1745875,1745912,1745924,1745929,1745941,1746001,1746028,1746109,1746782,1746784,1746787,1746813,1746842,1746880,1746883,1746889,1746894,1747448,1747466,1747503,1747575,1747578,1747601,1747773,1747920,1751057,1752039,1765132,1765183,1765188,1765193,1775081,1775102,1776253,1776585,1776594,1778204,1779069,1779074,1780290,1787632,1787676,1789029,1792353,1792376,1792650,1792655,1792802,1792804,1793723-1793724,1793728,1794114,1794192,1797821,1797823,1799068,1800495,1
 
803414,1805563,1806088,1806292,1806303-1806305,1806309,1806319,1806344,1806349-1806350,1806577,1806581,1806719,1807643,1807837,1807941,1807943,1808789,1809384-1809385,1809411,1809504,1809507,1809514,1809517,1810596,1810600,1810603

Modified: 
axis/axis2/java/core/branches/1_7/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=1811033&r1=1811032&r2=1811033&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/1_7/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
 (original)
+++ 
axis/axis2/java/core/branches/1_7/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
 Tue Oct  3 21:50:14 2017
@@ -1286,7 +1286,9 @@ public class ConverterUtil {
      * @return 0 if equal , + value if greater than , - value if less than
      */
     public static int compare(int intValue, String value) {
-        return intValue - Integer.parseInt(value);
+        int other = Integer.parseInt(value);
+        return intValue < other ? -1 : (intValue == other ? 0 : 1);
+
     }
 
     /**

Modified: 
axis/axis2/java/core/branches/1_7/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java?rev=1811033&r1=1811032&r2=1811033&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/1_7/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
 (original)
+++ 
axis/axis2/java/core/branches/1_7/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
 Tue Oct  3 21:50:14 2017
@@ -21,6 +21,8 @@ package org.apache.axis2.databinding.uti
 
 import junit.framework.TestCase;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.text.SimpleDateFormat;
@@ -560,5 +562,8 @@ public class ConverterUtilTest extends T
 
     }
 
-
+    public void testCompareInt() {
+        // 
https://stackoverflow.com/questions/46372764/axis2-adb-and-mininclusive-2147483648
+        assertThat(ConverterUtil.compare(3, "-2147483648")).isGreaterThan(0);
+    }
 }


Reply via email to