Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.6.1
-
None
-
Patch Available
Description
Generated code always calls TBaseHelper.compareTo in implementations of compareTo for the DTO.
In javame's lib, there is a static utility method called TBaseHelper.compareTo for anything (int, short, byte, ...) but Object, which has TBaseHelper.compareObjects instead.
When a structure's field is a structure itself into thrift's contract, the generated code tries to call TBaseHelper.compareTo instead of TBaseHelper.compareObjects.
It's much easier to fix this in the library itself by making names uniform.
Attached patch fixes this issue by renaming compareObjects into compareTo.