Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The KafkaListenerEndpointRegistry refactoring for List.isEmpty() instead of List.size() > 0 #3349

Closed
artembilan opened this issue Jul 10, 2024 Discussed in #3348 · 0 comments · Fixed by #3350
Closed

The KafkaListenerEndpointRegistry refactoring for List.isEmpty() instead of List.size() > 0 #3349

artembilan opened this issue Jul 10, 2024 Discussed in #3348 · 0 comments · Fixed by #3350

Comments

@artembilan
Copy link
Member

Discussed in #3348

Originally posted by wzq1022 July 10, 2024
In KafkaListenerEndpointRegistry , line 399

   	if (listenerContainersToStop.size() > 0) {
   		...
   	}

why not use

		if (!listenerContainersToStop.isEmpty()) {
			...
		}

Normally, IDEA will prompt for modification, but why didn't the person who modified this file modify it? Is there any difference? I'm curious.

@artembilan artembilan added this to the 3.3.0-M1 milestone Jul 10, 2024
wzq1022 added a commit to wzq1022/spring-kafka that referenced this issue Jul 11, 2024
Fixes: spring-projects#3349

* The KafkaListenerEndpointRegistry refactoring for List.isEmpty() instead of List.size() > 0
wzq1022 added a commit to wzq1022/spring-kafka that referenced this issue Jul 11, 2024
Fixes: spring-projects#3349

* The KafkaListenerEndpointRegistry refactoring for List.isEmpty() instead of List.size() > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant