GH-1145: Backport NPE Fix
Resolves https://github.com/spring-projects/spring-kafka/issues/1145 **cherry-pick to 2.0.x, 1.3.x**
This commit is contained in:
committed by
Artem Bilan
parent
bb06d194f6
commit
65741531bb
@@ -562,7 +562,10 @@ public class KafkaMessageListenerContainer<K, V> extends AbstractMessageListener
|
||||
};
|
||||
}
|
||||
|
||||
private void seekPartitions(Collection<TopicPartition> partitions, boolean idle) {
|
||||
private void seekPartitions(@Nullable Collection<TopicPartition> partitions, boolean idle) {
|
||||
if (partitions == null) {
|
||||
return;
|
||||
}
|
||||
Map<TopicPartition, Long> current = new HashMap<>();
|
||||
for (TopicPartition topicPartition : partitions) {
|
||||
current.put(topicPartition, ListenerConsumer.this.consumer.position(topicPartition));
|
||||
|
||||
Reference in New Issue
Block a user