File axis-compareto.patch of Package axis.10299

--- axis-1_4/src/org/apache/axis/types/UnsignedInt.java	2017-10-04 23:06:07.691042250 +0200
+++ axis-1_4/src/org/apache/axis/types/UnsignedInt.java	2017-10-05 08:10:43.431335157 +0200
@@ -106,13 +106,20 @@
 
     // implement java.lang.comparable interface
     public int compareTo(Object obj) {
+      UnsignedInt other = null;
+      if (obj instanceof UnsignedInt)
+        other = (UnsignedInt) obj;	
+      if (other != null) {
       if (lValue != null)
-        return lValue.compareTo(obj);
+          return lValue.compareTo(other.lValue);
       else
-        if (equals(obj) == true)
+          return 1;  // object is greater
+      } else {
+        if (lValue == null)
             return 0;  // null == null
         else
-            return 1;  // object is greater
+          return -1;
+      }
     }
 
     // Implement java.lang.Number interface
--- axis-1_4/src/org/apache/axis/types/UnsignedLong.java	2017-10-04 23:06:07.691042250 +0200
+++ axis-1_4/src/org/apache/axis/types/UnsignedLong.java	2017-10-05 08:08:22.105252757 +0200
@@ -100,12 +100,20 @@
 
     // implement java.lang.comparable interface
     public int compareTo(Object obj) {
+        UnsignedLong other = null;
+        if (obj instanceof UnsignedLong)
+            other = (UnsignedLong) obj;	
+        if (other != null) {
         if (lValue != null)
-            return lValue.compareTo(obj);
-        else if (equals(obj) == true)
-            return 0;  // null == null
+                return lValue.compareTo(other.lValue);
         else
             return 1;  // object is greater
+        } else {
+            if (lValue == null)
+                return 0; // null == null
+            else
+                return -1;
+        }
     }
 
     // Implement java.lang.Number interface
openSUSE Build Service is sponsored by