You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2011/08/03 00:38:27 UTC
[jira] [Closed] (THRIFT-1255) Mismatch of method name between
JavaME's lib and generated code (compareTo/compareObjects)
[ https://issues.apache.org/jira/browse/THRIFT-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury closed THRIFT-1255.
---------------------------------
Resolution: Fixed
Fix Version/s: 0.7
Assignee: Raphaël Bartement
I just committed this. Thanks Raphael!
> Mismatch of method name between JavaME's lib and generated code (compareTo/compareObjects)
> ------------------------------------------------------------------------------------------
>
> Key: THRIFT-1255
> URL: https://issues.apache.org/jira/browse/THRIFT-1255
> Project: Thrift
> Issue Type: Bug
> Components: JavaME - Compiler, JavaME - Library
> Affects Versions: 0.6.1
> Reporter: Raphaël Bartement
> Assignee: Raphaël Bartement
> Fix For: 0.7
>
> Attachments: Patch.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira