thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Geyer (Jira)" <j...@apache.org>
Subject [jira] [Reopened] (THRIFT-5045) Updating from 0.9.3 to 0.13.0 breaks
Date Thu, 05 Dec 2019 22:48:00 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-5045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jens Geyer reopened THRIFT-5045:
--------------------------------

> 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
>            Assignee: Jens Geyer
>            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)

Mime
View raw message