GH-3349: Use List.isEmpty() in the KafkaListenerEndpointRegistry
Fixes: #3349 * The `KafkaListenerEndpointRegistry` refactoring for `List.isEmpty()` instead of `List.size() > 0`
This commit is contained in:
@@ -396,7 +396,7 @@ public class KafkaListenerEndpointRegistry implements ListenerContainerRegistry,
|
||||
public void stop(Runnable callback) {
|
||||
this.running = false;
|
||||
Collection<MessageListenerContainer> listenerContainersToStop = getListenerContainers();
|
||||
if (listenerContainersToStop.size() > 0) {
|
||||
if (!listenerContainersToStop.isEmpty()) {
|
||||
AggregatingCallback aggregatingCallback = new AggregatingCallback(listenerContainersToStop.size(),
|
||||
callback);
|
||||
for (MessageListenerContainer listenerContainer : listenerContainersToStop) {
|
||||
|
||||
Reference in New Issue
Block a user