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

Updating from 0.9.3 to 0.13.0 breaks

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 0.10.0, 0.11.0, 0.12.0, 0.13.0
    • Fix Version/s: None
    • Component/s: Java - Library
    • Labels:
      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

            • Assignee:
              jensg Jens Geyer
              Reporter:
              lingchao xia0c

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment