Grokbase Groups Thrift dev June 2011
FAQ

[Thrift-dev] [jira] [Commented] (THRIFT-633) Generated code has @Override annotations which won't compile using Apple's JDK 1.5

Toby Thain (JIRA)
Jun 8, 2011 at 1:50 am
[ https://issues.apache.org/jira/browse/THRIFT-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045749#comment-13045749 ]

Toby Thain commented on THRIFT-633:
-----------------------------------

The bug is certainly still there with javac 1.5.0_19 and OS X 10.4.11.

Another problem under 1.5 is that IOException does not have the constructor used by Thrift code.

With the annotations removed, and the IOExceptions constructed using the parameter-less constructor, the code appears to build okay.

( sed -e /@Override/d -e 's/IOException(te)/IOException()/' )

It is unfortunate that 1.5 is not supported. Perhaps it should be a separate language target?

Generated code has @Override annotations which won't compile using Apple's JDK 1.5
----------------------------------------------------------------------------------

Key: THRIFT-633
URL: https://issues.apache.org/jira/browse/THRIFT-633
Project: Thrift
Issue Type: Bug
Components: Java - Compiler
Environment: Mac OS X Tiger/Leopard JDK 1.5
Reporter: Mathias Herberts

Apple's JDK 1.5 does not recognize @Override annotation. Tests fail with error:
[javac] /private/var/tmp/thrift-trunk/lib/java/gen-java/thrift/test/ComparableUnion.java:251: method does not override a method from its superclass
[javac] @Override
[javac] ^
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
reply

Search Discussions

1 response

  • Jake Farrell (JIRA) at Jun 8, 2011 at 2:39 pm
    [ https://issues.apache.org/jira/browse/THRIFT-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045982#comment-13045982 ]

    Jake Farrell commented on THRIFT-633:
    -------------------------------------

    Toby, have you tried reproducing this against the trunk? THRIFT-1170 should have take care of this with the new java5 option.
    Generated code has @Override annotations which won't compile using Apple's JDK 1.5
    ----------------------------------------------------------------------------------

    Key: THRIFT-633
    URL: https://issues.apache.org/jira/browse/THRIFT-633
    Project: Thrift
    Issue Type: Bug
    Components: Java - Compiler
    Environment: Mac OS X Tiger/Leopard JDK 1.5
    Reporter: Mathias Herberts

    Apple's JDK 1.5 does not recognize @Override annotation. Tests fail with error:
    [javac] /private/var/tmp/thrift-trunk/lib/java/gen-java/thrift/test/ComparableUnion.java:251: method does not override a method from its superclass
    [javac] @Override
    [javac] ^
    --
    This message is automatically generated by JIRA.
    For more information on JIRA, see: http://www.atlassian.com/software/jira

Related Discussions

Discussion Navigation
viewthread | post

1 user in discussion

Jake Farrell (JIRA): 2 posts