[
https://issues.apache.org/jira/browse/STORM-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14876911#comment-14876911
]
ASF GitHub Bot commented on STORM-1051:
---------------------------------------
Github user schonfeld commented on a diff in the pull request:
https://github.com/apache/storm/pull/745#discussion_r39916772
--- Diff: storm-core/src/jvm/backtype/storm/messaging/netty/Client.java ---
@@ -317,7 +317,7 @@ private int iteratorSize(Iterator<TaskMessage> msgs) {
* If the write operation fails, then we will close the channel and
trigger a reconnect.
*/
private void flushMessages(Channel channel, final MessageBatch batch) {
- if(batch.isEmpty()){
+ if(null == batch || batch.isEmpty()){
--- End diff --
@erikdw better now
> Netty Client.java's flushMessages produces a NullPointerException
> -----------------------------------------------------------------
>
> Key: STORM-1051
> URL: https://issues.apache.org/jira/browse/STORM-1051
> Project: Apache Storm
> Issue Type: Bug
> Affects Versions: 0.10.0, 0.9.6
> Reporter: Michael Schonfeld
> Assignee: Michael Schonfeld
> Priority: Critical
>
> STORM-763 replaced `return batch != null && !batch.isEmpty();` with
> `if(batch.isEmpty())`... which means that if batch == null, a
> NullPointerException is thrown. Problem is, batch is often null, which means
> that 763 made Storm unusable...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)