GH-60: Fix NPE in KinesisMessageDrivenChAdapter
Fixes: spring-projects/spring-integration-aws#60 The attempts to extract `this.consumerInvokers.get(0)` when the `concurrency == 0` lead to the NPE * Wrap `this.consumerInvokers.get(0)` block to the `if(concurrency != 0)`
This commit is contained in:
@@ -552,9 +552,11 @@ public class KinesisMessageDrivenChannelAdapter extends MessageProducerSupport i
|
||||
}
|
||||
}
|
||||
|
||||
ConsumerInvoker firstConsumerInvoker = this.consumerInvokers.get(0);
|
||||
firstConsumerInvoker.addConsumer(shardConsumer);
|
||||
this.consumerInvokerMaxCapacity = firstConsumerInvoker.consumers.size();
|
||||
if (this.concurrency != 0) {
|
||||
ConsumerInvoker firstConsumerInvoker = this.consumerInvokers.get(0);
|
||||
firstConsumerInvoker.addConsumer(shardConsumer);
|
||||
this.consumerInvokerMaxCapacity = firstConsumerInvoker.consumers.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user