Skip to content

Commit

Permalink
[Issue 7407] NPE with tombstones (apache#7408)
Browse files Browse the repository at this point in the history
Added check to prevent NPE when a tombstone (null value) is produced.

Fixes apache#7407
  • Loading branch information
fmiguelez authored Jul 6, 2020
1 parent 53c50c1 commit 90c2f4a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private void init(ConsumerConfigurationData<?> conf) {
public void updateNumMsgsReceived(Message<?> message) {
if (message != null) {
numMsgsReceived.increment();
numBytesReceived.add(message.getData().length);
numBytesReceived.add(message.getData() == null ? 0 : message.getData().length);
}
}

Expand Down

0 comments on commit 90c2f4a

Please sign in to comment.