Skip to content

Commit 78eda96

Browse files
committed
Polishing
1 parent 70dbaf9 commit 78eda96

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
@SuppressWarnings("deprecation")
4848
public class MockHttpSession implements HttpSession {
4949

50+
/**
51+
* The session cookie name.
52+
*/
5053
public static final String SESSION_COOKIE_NAME = "JSESSION";
5154

5255

@@ -180,7 +183,7 @@ public void setAttribute(String name, Object value) {
180183
Object oldValue = this.attributes.put(name, value);
181184
if (value != oldValue) {
182185
if (oldValue instanceof HttpSessionBindingListener) {
183-
((HttpSessionBindingListener) value).valueUnbound(new HttpSessionBindingEvent(this, name, oldValue));
186+
((HttpSessionBindingListener) oldValue).valueUnbound(new HttpSessionBindingEvent(this, name, oldValue));
184187
}
185188
if (value instanceof HttpSessionBindingListener) {
186189
((HttpSessionBindingListener) value).valueBound(new HttpSessionBindingEvent(this, name, value));

0 commit comments

Comments
 (0)