Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.1
    • Fix Version/s: 0.7
    • Component/s: Java - Compiler
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      The Thrift Java compiler creates code that is not compliant with Java 5.

      One issue is the @Override annotation on the clear() method.
      The other issue is creating a IOException with a TException as a parameter in writeObject and readObject.

      The attached patch creates a new option for the compiler, java5, which outputs java 5 compliant code.

      1. java5_trunk.patch
        1 kB
        Greg Moulliet
      2. java5.patch
        2 kB
        Greg Moulliet

        Activity

        Hide
        Hudson added a comment -

        Integrated in Thrift #147 (See https://builds.apache.org/hudson/job/Thrift/147/)
        THRIFT-1170. java: Thrift Generated Code and Java 5

        This patch adds a trivial java5 option to the java generator.

        Patch: Greg Moulliet

        bryanduxbury : http://svn.apache.org/viewvc/?view=rev&rev=1126765
        Files :

        • /thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
        • /thrift/trunk/lib/java/src/org/apache/thrift/TUnion.java
        Show
        Hudson added a comment - Integrated in Thrift #147 (See https://builds.apache.org/hudson/job/Thrift/147/ ) THRIFT-1170 . java: Thrift Generated Code and Java 5 This patch adds a trivial java5 option to the java generator. Patch: Greg Moulliet bryanduxbury : http://svn.apache.org/viewvc/?view=rev&rev=1126765 Files : /thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc /thrift/trunk/lib/java/src/org/apache/thrift/TUnion.java
        Hide
        Bryan Duxbury added a comment -

        I just committed the latest patch to TRUNK.

        Show
        Bryan Duxbury added a comment - I just committed the latest patch to TRUNK.
        Hide
        Greg Moulliet added a comment -

        Patch updated for trunk.
        The flag for android_legacy covers one of the issues for java 5, so I changed the java5 flag to include android_legacy

        Show
        Greg Moulliet added a comment - Patch updated for trunk. The flag for android_legacy covers one of the issues for java 5, so I changed the java5 flag to include android_legacy
        Hide
        Bryan Duxbury added a comment -

        Is this patch based on the 0.6.1 branch? I'd prefer not to make more modifications to that branch and instead work on trunk. Would you be willing to rebase your patch to trunk?

        Show
        Bryan Duxbury added a comment - Is this patch based on the 0.6.1 branch? I'd prefer not to make more modifications to that branch and instead work on trunk. Would you be willing to rebase your patch to trunk?

          People

          • Assignee:
            Greg Moulliet
            Reporter:
            Greg Moulliet
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development