Thrift
  1. Thrift
  2. THRIFT-1447

NullpointerException in ProcessFunction.class :in "oneway" method

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: Java - Library
    • Labels:
      None
    • Environment:

      Mac OS X Lion 10.7.2
      java version "1.6.0_29"
      Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527)
      Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

      Description

      lines 31-36 of ProcessFunction.class:
      iprot.readMessageEnd();
      TBase result = getResult(iface, args);
      oprot.writeMessageBegin(new TMessage(getMethodName(), TMessageType.REPLY, seqid));
      result.write(oprot);
      oprot.writeMessageEnd();
      oprot.getTransport().flush();

      problem in case where result == null;

      getResult(..) for my "oneway" method(generated code) :
      @Override
      protected org.apache.thrift.TBase getResult(final I iface, final processUA_args args) throws org.apache.thrift.TException

      { iface.processUA(args.appIdNames, args.platform); return null; }

      so it always return null, and crash on 34 lines(ProcessFunction.class)

      1. onewayfix.patch
        2 kB
        Janick Bernet

        Issue Links

          Activity

            People

            • Assignee:
              Ihor Mysak
              Reporter:
              Ihor Mysak
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development