thrift-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryanduxb...@apache.org
Subject svn commit: r1153295 - /thrift/trunk/lib/javame/src/org/apache/thrift/TBaseHelper.java
Date Tue, 02 Aug 2011 22:37:17 GMT
Author: bryanduxbury
Date: Tue Aug  2 22:37:16 2011
New Revision: 1153295

URL: http://svn.apache.org/viewvc?rev=1153295&view=rev
Log:
THRIFT-1255. javame: Mismatch of method name between JavaME's lib and generated code (compareTo/compareObjects)

Patch: Raphael Bartement

Modified:
    thrift/trunk/lib/javame/src/org/apache/thrift/TBaseHelper.java

Modified: thrift/trunk/lib/javame/src/org/apache/thrift/TBaseHelper.java
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/javame/src/org/apache/thrift/TBaseHelper.java?rev=1153295&r1=1153294&r2=1153295&view=diff
==============================================================================
--- thrift/trunk/lib/javame/src/org/apache/thrift/TBaseHelper.java (original)
+++ thrift/trunk/lib/javame/src/org/apache/thrift/TBaseHelper.java Tue Aug  2 22:37:16 2011
@@ -112,7 +112,7 @@ public class TBaseHelper {
         return 0;
     }
 
-    public static int compareObjects(Object a, Object b) {
+    public static int compareTo(Object a, Object b) {
         if (a instanceof Vector) {
             return compareTo((Vector)a, (Vector)b);
         } if (a instanceof Hashtable) {
@@ -130,7 +130,7 @@ public class TBaseHelper {
         for (int i = 0; i < a.size(); i++) {
             Object oA = a.elementAt(i);
             Object oB = b.elementAt(i);
-            lastComparison = compareObjects(oA, oB);
+            lastComparison = compareTo(oA, oB);
             if (lastComparison != 0) {
                 return lastComparison;
             }
@@ -149,9 +149,9 @@ public class TBaseHelper {
         while (lastComparison == 0 && enumA.hasMoreElements()) {
             Object keyA = enumA.nextElement();
             Object keyB = enumB.nextElement();
-            lastComparison = compareObjects(keyA, keyB);
+            lastComparison = compareTo(keyA, keyB);
             if (lastComparison == 0) {
-                lastComparison = compareObjects(a.get(keyA), b.get(keyB));
+                lastComparison = compareTo(a.get(keyA), b.get(keyB));
             }
         }
         return lastComparison;



Mime
View raw message