You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (Closed) (JIRA)" <ji...@apache.org> on 2012/02/15 00:43:59 UTC

[jira] [Closed] (THRIFT-1447) NullpointerException in ProcessFunction.class :in "oneway" method

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

Bryan Duxbury closed THRIFT-1447.
---------------------------------

    Resolution: Fixed
      Assignee: Ihor Mysak

I just committed this. Thanks for the patch, Ihor!
                
> NullpointerException in ProcessFunction.class :in "oneway" method
> -----------------------------------------------------------------
>
>                 Key: THRIFT-1447
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1447
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.8
>         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)
>            Reporter: Ihor Mysak
>            Assignee: Ihor Mysak
>            Priority: Blocker
>             Fix For: 0.9
>
>         Attachments: onewayfix.patch
>
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira