[ 
https://issues.apache.org/jira/browse/THRIFT-5045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16989210#comment-16989210
 ] 

Duru Can Celasun commented on THRIFT-5045:
------------------------------------------

0.9.3 is more than 4 years old, there has been many releases with breaking 
changes since then. You can see the changelog 
[here|https://github.com/apache/thrift/blob/master/CHANGES.md].

Keep in mind that all tagged releases in thrift are major releases (with the 
rare exception of backports, e.g 0.9.3.1) where breaking changes are allowed as 
long as they are justified and documented.

> Updating from 0.9.3 to 0.13.0 breaks
> ------------------------------------
>
>                 Key: THRIFT-5045
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5045
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.10.0, 0.11.0, 0.12.0, 0.13.0
>            Reporter: xia0c
>            Priority: Major
>
> When I try to upgrade Thrift from 0.9.3 to the version after 0.10.0. The 
> upgrade breaks my existing code when I extend org.apache.thrift.async. e.g.
> {code:java}
> public class Testlibthrift extends org.apache.thrift.async.TAsyncMethodCall{
>       
>     protected Testlibthrift(TAsyncClient client, TProtocolFactory 
> protocolFactory, TNonblockingTransport transport,
>                       AsyncMethodCallback callback, boolean isOneway) {
>               super(client, protocolFactory, transport, callback, isOneway);
>               // TODO Auto-generated constructor stub
>       }
>       public void write_args(org.apache.thrift.protocol.TProtocol prot) 
> throws org.apache.thrift.TException {
>         prot.writeMessageBegin(new 
> org.apache.thrift.protocol.TMessage("ping", 
> org.apache.thrift.protocol.TMessageType.CALL, 0));
>       }
>       public void getResult() throws org.apache.thrift.TException {
>         if (getState() != 
> org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
>           throw new IllegalStateException("Method call not finished!");
>         }
>         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = 
> new 
> org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
>         org.apache.thrift.protocol.TProtocol prot = 
> client.getProtocolFactory().getProtocol(memoryTransport);
>       }
> }
> {code}
> The code should pass. However, it throws an error:
> {code:java}
> Testlibthrift is not abstract and does not override abstract method 
> getResult() in org.apache.thrift.async.TAsyncMethodCall
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to