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

Updating from 0.9.3 to 0.13.0 breaks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 0.10.0, 0.11.0, 0.12.0, 0.13.0
    • None
    • Java - Library
    • None

    Description

      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.

      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);
            }
      
      }
      

      The code should pass. However, it throws an error:

      Testlibthrift is not abstract and does not override abstract method getResult() in org.apache.thrift.async.TAsyncMethodCall
      

      Attachments

        Activity

          People

            jensg Jens Geyer
            lingchao xia0c
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: