diff options
Diffstat (limited to 'src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java')
-rw-r--r-- | src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java b/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java index 93374fb..b66a251 100644 --- a/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java +++ b/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java @@ -77,7 +77,7 @@ public class Kafka011Consumer implements Consumer { fId = id; fCreateTimeMs = System.currentTimeMillis(); fLastTouch = fCreateTimeMs; - fPendingMsgs = new LinkedBlockingQueue<ConsumerRecord<String, String>>(); + fPendingMsgs = new LinkedBlockingQueue<>(); fLogTag = fGroup + "(" + fId + ")/" + fTopic; offset = 0; state = Kafka011Consumer.State.OPENED; @@ -113,7 +113,7 @@ public class Kafka011Consumer implements Consumer { public synchronized Consumer.Message nextMessage() { try { - if (fPendingMsgs.size() > 0) { + if (fPendingMsgs.isEmpty()) { return makeMessage(fPendingMsgs.take()); } } catch (InterruptedException x) { |