From 78eda961f26cef67f45da81bda5a84e42ef0d342 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 1 Aug 2018 13:11:35 +0200 Subject: [PATCH] Polishing --- .../org/springframework/mock/web/test/MockHttpSession.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java index 5209ed5053..03d4e2cf5a 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java +++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java @@ -47,6 +47,9 @@ import org.springframework.util.StringUtils; @SuppressWarnings("deprecation") public class MockHttpSession implements HttpSession { + /** + * The session cookie name. + */ public static final String SESSION_COOKIE_NAME = "JSESSION"; @@ -180,7 +183,7 @@ public class MockHttpSession implements HttpSession { Object oldValue = this.attributes.put(name, value); if (value != oldValue) { if (oldValue instanceof HttpSessionBindingListener) { - ((HttpSessionBindingListener) value).valueUnbound(new HttpSessionBindingEvent(this, name, oldValue)); + ((HttpSessionBindingListener) oldValue).valueUnbound(new HttpSessionBindingEvent(this, name, oldValue)); } if (value instanceof HttpSessionBindingListener) { ((HttpSessionBindingListener) value).valueBound(new HttpSessionBindingEvent(this, name, value));