You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Arno Noordover (JIRA)" <ji...@apache.org> on 2016/07/04 13:14:11 UTC

[jira] [Commented] (CAMEL-10116) NullPointerException in DefaultAsyncProcessorAwaitManager

    [ https://issues.apache.org/jira/browse/CAMEL-10116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361297#comment-15361297 ] 

Arno Noordover commented on CAMEL-10116:
----------------------------------------

[~wnagele] we have been busy looking at this issue and we don't understand how you can get a NPE in that line of code.
The lines are controlled by "if (list != null && !list.isEmpty()) {...", so we don't expect a NPE on that line.
The only explanation we had would be that the MessageHistory list is mutated somewhere else.
We don't expect that to be the case but we have no other explanation.
We might clone the MessageHistory list before checking and use the clone, but we wouldn't expect that to be needed.

Therefore we would like to ask you for a little bit more information about this issue before making this change.

Can you provide this?

> NullPointerException in DefaultAsyncProcessorAwaitManager
> ---------------------------------------------------------
>
>                 Key: CAMEL-10116
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10116
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.17.1
>            Reporter: Wolfgang Nagele
>            Assignee: Arno Noordover
>             Fix For: 2.17.3, 2.18.0
>
>
> The following statement can cause a NPE (line #256 in DefaultAsyncProcessorAwaitManager at version 2.17.1):
> {{MessageHistory history = list.get(list.size() - 1);}}
> {code}
> java.lang.NullPointerException: null
>         at org.apache.camel.impl.DefaultAsyncProcessorAwaitManager$AwaitThreadEntry.<init>(DefaultAsyncProcessorAwaitManager.java:257) ~[camel-core-2.17.1.jar!/:2.17.1]
>         at org.apache.camel.impl.DefaultAsyncProcessorAwaitManager$AwaitThreadEntry.<init>(DefaultAsyncProcessorAwaitManager.java:238) ~[camel-core-2.17.1.jar!/:2.17.1]
>         at org.apache.camel.impl.DefaultAsyncProcessorAwaitManager.await(DefaultAsyncProcessorAwaitManager.java:73) ~[camel-core-2.17.1.jar!/:2.17.1]
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:122) ~[camel-core-2.17.1.jar!/:2.17.1]
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87) ~[camel-core-2.17.1.jar!/:2.17.1]
>         at org.apache.camel.component.stream.StreamConsumer.processLine(StreamConsumer.java:218) ~[camel-stream-2.17.1.jar!/:2.17.1]
>         at org.apache.camel.component.stream.StreamConsumer.readFromStream(StreamConsumer.java:146) ~[camel-stream-2.17.1.jar!/:2.17.1]
>         at org.apache.camel.component.stream.StreamConsumer.run(StreamConsumer.java:99) ~[camel-stream-2.17.1.jar!/:2.17.1]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)