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-projects-issues opened this issue Aug 1, 2018 · 1 comment
Assignees
Labels
in: test type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues 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-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues 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
Labels
in: test type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants