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

Christian Ciach updated THRIFT-4368:
------------------------------------
    Description: 
While creating a pull request for another ticket, the null-analyzer of Eclipse 
found a guaranteed NullPointerException in 
{{org.apache.thrift.TBaseAsyncProcessor<I>}}.

In the method {{process(AsyncFrameBuffer)}} we see this code fragment:

 {{       AsyncProcessFunction fn = processMap.get(msg.name);
        if (fn == null) {
            TProtocolUtil.skip(in, TType.STRUCT);
            in.readMessageEnd();
            if (!fn.isOneway()) {}}


The variable {{fn}} can only be null in the last line.

  was:
While creating a pull request for another ticket, the null-analyzer of Eclipse 
found a guaranteed NullPointerException in 
{{org.apache.thrift.TBaseAsyncProcessor<I>}}.

In the method {{process(AsyncFrameBuffer)}} we see this code fragment:
{{
        AsyncProcessFunction fn = processMap.get(msg.name);
        if (fn == null) {
            TProtocolUtil.skip(in, TType.STRUCT);
            in.readMessageEnd();
            if (!fn.isOneway()) {
}}

The variable {{fn}} can only be null in the last line.


> Guaranteed NPE in TBaseAsyncProcessor.java
> ------------------------------------------
>
>                 Key: THRIFT-4368
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4368
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.10.0
>            Reporter: Christian Ciach
>
> While creating a pull request for another ticket, the null-analyzer of 
> Eclipse found a guaranteed NullPointerException in 
> {{org.apache.thrift.TBaseAsyncProcessor<I>}}.
> In the method {{process(AsyncFrameBuffer)}} we see this code fragment:
>  {{       AsyncProcessFunction fn = processMap.get(msg.name);
>         if (fn == null) {
>             TProtocolUtil.skip(in, TType.STRUCT);
>             in.readMessageEnd();
>             if (!fn.isOneway()) {}}
> The variable {{fn}} can only be null in the last line.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to