From b21a98e2f6af2be60a6fb550a3605d25fa76fd1d Mon Sep 17 00:00:00 2001 From: kaijianding Date: Wed, 10 Aug 2016 22:59:17 +0800 Subject: [PATCH] fix NPE if queueBufferLength is null in KafkaEightSimpleConsumerFirehoseFactory (#3345) --- .../firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-contrib/kafka-eight-simpleConsumer/src/main/java/io/druid/firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java b/extensions-contrib/kafka-eight-simpleConsumer/src/main/java/io/druid/firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java index b1b851f743c..db41462b007 100644 --- a/extensions-contrib/kafka-eight-simpleConsumer/src/main/java/io/druid/firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java +++ b/extensions-contrib/kafka-eight-simpleConsumer/src/main/java/io/druid/firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java @@ -106,7 +106,7 @@ public class KafkaEightSimpleConsumerFirehoseFactory implements ); this.queueBufferLength = queueBufferLength == null ? DEFAULT_QUEUE_BUFFER_LENGTH : queueBufferLength; - Preconditions.checkArgument(queueBufferLength > 0, "queueBufferLength must be positive number"); + Preconditions.checkArgument(this.queueBufferLength > 0, "queueBufferLength must be positive number"); log.info("queueBufferLength loaded as[%s]", this.queueBufferLength); this.earliest = resetOffsetToEarliest == null ? true : resetOffsetToEarliest.booleanValue();