Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1255

Mismatch of method name between JavaME's lib and generated code (compareTo/compareObjects)

    XMLWordPrintableJSON

Details

    • 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.

      Attachments

        1. Patch.patch
          1 kB
          Raphaël B.

        Activity

          People

            rbartement Raphaël B.
            rbartement Raphaël B.
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: