mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-1255. javame: Mismatch of method name between JavaME's lib and generated code (compareTo/compareObjects)
Patch: Raphael Bartement git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1153295 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d9b32835ea
commit
4e0192f660
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user