Skip to content

GH-3319: Fix NPE in the KafkaListenerEndpointRegistry #3320

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

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

artembilan
Copy link
Member

The KafkaListenerEndpointRegistry.getUnregisteredListenerContainer() returns null when container is already present in the internal unregisteredContainers cache

  • Fix KafkaListenerEndpointRegistry.getUnregisteredListenerContainer() to return a container instance from the unregisteredContainers cache

Auto-cherry-pick to 3.2.x & 3.1.x

The `KafkaListenerEndpointRegistry.getUnregisteredListenerContainer()`
returns `null` when container is already present in the internal `unregisteredContainers` cache

* Fix `KafkaListenerEndpointRegistry.getUnregisteredListenerContainer()` to return a container
instance from the `unregisteredContainers` cache

**Auto-cherry-pick to `3.2.x` & `3.1.x`**
@sobychacko
Copy link
Contributor

Do you think we need to update the Javadoc on ListenerContainerRegistry since we are not returning null any longer?

@artembilan
Copy link
Member Author

It still will be null if there is no such a bean.

@sobychacko sobychacko merged commit 8096c9d into spring-projects:main Jun 20, 2024
3 checks passed
spring-builds pushed a commit that referenced this pull request Jun 20, 2024
The `KafkaListenerEndpointRegistry.getUnregisteredListenerContainer()`
returns `null` when container is already present in the internal `unregisteredContainers` cache

* Fix `KafkaListenerEndpointRegistry.getUnregisteredListenerContainer()` to return a container
instance from the `unregisteredContainers` cache

(cherry picked from commit 8096c9d)
sobychacko pushed a commit that referenced this pull request Jun 20, 2024
Fixes: #3319

The `KafkaListenerEndpointRegistry.getUnregisteredListenerContainer()`
returns `null` when container is already present in the internal `unregisteredContainers` cache

* Fix `KafkaListenerEndpointRegistry.getUnregisteredListenerContainer()` to return a container
instance from the `unregisteredContainers` cache

(cherry picked from commit 8096c9d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants