Skip to content

GH-3888: Fix NPE in the RedisLockRegistry.destroy() #3889

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 2 commits into from
Sep 20, 2022

Conversation

artembilan
Copy link
Member

Fixed #3888

When RedisLockType.SPIN_LOCK (default), the RedisLockRegistry.destroy() causes an NPE on the redisMessageListenerContainer since pub-sub is not used in a busy-spin mode

  • Check for redisMessageListenerContainer before calling its destroy()

Cherry-pick to 5.5.x

Fixed spring-projects#3888

When `RedisLockType.SPIN_LOCK` (default), the `RedisLockRegistry.destroy()`
causes an NPE on the `redisMessageListenerContainer` since pub-sub is not used
in a busy-spin mode

* Check for `redisMessageListenerContainer` before calling its `destroy()`

**Cherry-pick to 5.5.x**
Copy link
Contributor

@garyrussell garyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment/question.

@garyrussell garyrussell merged commit 695e156 into spring-projects:main Sep 20, 2022
garyrussell pushed a commit that referenced this pull request Sep 20, 2022
* GH-3888: Fix NPE in the `RedisLockRegistry.destroy()`

Fixed #3888

When `RedisLockType.SPIN_LOCK` (default), the `RedisLockRegistry.destroy()`
causes an NPE on the `redisMessageListenerContainer` since pub-sub is not used
in a busy-spin mode

* Check for `redisMessageListenerContainer` before calling its `destroy()`

**Cherry-pick to 5.5.x**

* * Reset properties in the `RedisLockRegistry` after `destroy()`
@garyrussell
Copy link
Contributor

...and cherry-picked, resolving conflicts in tests.

@artembilan artembilan deleted the GH-3888 branch September 20, 2022 18:36
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.

NullPointerException when RedisLockRegistry is destroyed
2 participants