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

MockHttpSession doesn't publish session binding event for replaced attributes [SPR-17109] #21646

Closed
spring-issuemaster opened this issue Aug 1, 2018 · 1 comment
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Aug 1, 2018

Vedran Pavic opened SPR-17109 and commented

At present, MockHttpSession invokes HttpSessionBindingListener instances when attribute is set #valueBound and when it is removed #valueUnbound.

However, in case when an existing attribute is being updated, if replaced value is an HttpSessionBindingListener instance #valueUnbound should be invoked as well.

For reference, see Tomcat's StandardSession [1] and Spring Session's HttpSessionAdapter [2].

[1] https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/session/StandardSession.java#L1444-L1457
[2] https://github.com/spring-projects/spring-session/blob/master/spring-session-core/src/main/java/org/springframework/session/web/http/HttpSessionAdapter.java#L143-L150


Affects: 4.3.18, 5.0.8, 5.1 RC1

Referenced from: pull request #1912, and commits 70dbaf9

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Aug 1, 2018

Vedran Pavic commented

Updated issue with Pull Request URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.