Skip to content

Commit ed14bcf

Browse files
committed
Fix Sonar issue
1 parent 6a61cad commit ed14bcf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2377,10 +2377,9 @@ public void onPartitionsAssigned(Collection<TopicPartition> partitions) {
23772377
+ "consumer paused again, so the initial poll() will never return any records");
23782378
}
23792379
ListenerConsumer.this.assignedPartitions.addAll(partitions);
2380-
if (ListenerConsumer.this.commitCurrentOnAssignment) {
2381-
if (!collectAndCommitIfNecessary(partitions)) {
2382-
return;
2383-
}
2380+
if (ListenerConsumer.this.commitCurrentOnAssignment
2381+
&& !collectAndCommitIfNecessary(partitions)) {
2382+
return;
23842383
}
23852384
if (ListenerConsumer.this.genericListener instanceof ConsumerSeekAware) {
23862385
seekPartitions(partitions, false);

0 commit comments

Comments
 (0)