Skip to content

Commit e54b5a0

Browse files
remove unnecessary code (#4191)
Signed-off-by: moonyoungCHAE <xpf_fl@naver.com>
1 parent b74618f commit e54b5a0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ protected void checkTopics() {
554554
List<String> missing = null;
555555
try (AdminClient client = AdminClient.create(configs)) { // NOSONAR - false positive null check
556556
if (client != null) {
557-
@Nullable String @Nullable[] topics = this.containerProperties.getTopics();
557+
@Nullable String[] topics = this.containerProperties.getTopics();
558558
if (topics == null) {
559559
topics = Arrays.stream(this.containerProperties.getTopicPartitions())
560560
.map(TopicPartitionOffset::getTopic)
@@ -578,15 +578,15 @@ protected void checkTopics() {
578578
}
579579
})
580580
.map(Entry::getKey)
581-
.collect(Collectors.toList());
581+
.toList();
582582
}
583583
}
584584
catch (Exception e) {
585585
this.logger.error(e, "Failed to check topic existence");
586586
}
587587
if (missing != null && !missing.isEmpty()) {
588588
throw new IllegalStateException(
589-
"Topic(s) " + missing.toString()
589+
"Topic(s) " + missing
590590
+ " is/are not present and missingTopicsFatal is true");
591591
}
592592
}
@@ -626,7 +626,6 @@ public final void stop(boolean wait) {
626626
final CountDownLatch latch = new CountDownLatch(1);
627627
this.lifecycleLock.lock();
628628
try {
629-
630629
doStop(latch::countDown);
631630
}
632631
finally {
@@ -648,7 +647,6 @@ public final void stop(boolean wait) {
648647
finally {
649648
this.lifecycleLock.unlock();
650649
}
651-
652650
}
653651
}
654652
}

0 commit comments

Comments
 (0)