Skip to content

Conversation

vpavic
Copy link
Contributor

@vpavic vpavic commented Sep 27, 2022

While attempting to migrate RedisIndexedSessionRepository to RedisSessionMapper in order to reuse the session mapping logic, I ran into #1338. This problem has been somewhat hidden by the old mapping code being too lenient and accepting a map with no entries at all whereas RedisSessionMapper validates both map not being empty as well as presence of key session properties.


At present, RedisIndexedSessionRepository publishes a SessionCreatedEvent backed by an empty MapSession instance. This happens because session delta has been cleared before publishing a message to the session created channel.

Fixes gh-1338

At present, RedisIndexedSessionRepository publishes a SessionCreatedEvent backed by an empty MapSession instance. This happens because session delta has been cleared before publishing a message to the session created channel.

Fixes spring-projectsgh-1338
This commit addresses code warnings due to nullability of return values.
Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thanks for the Pull Request! This is now merged into main 😄

@rwinch rwinch merged commit b5197b8 into spring-projects:main Oct 6, 2022
@vpavic vpavic deleted the gh-1338 branch October 6, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RedisOperationsSessionRepository: SessionCreatedEvents don't contain RedisSession -> Session-Attributes cannot be modified in Listeners
2 participants