File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
org.springframework.test/src/main/java/org/springframework/mock/web
org.springframework.web.servlet/src/test/java/org/springframework/mock/web
org.springframework.web/src/test/java/org/springframework/mock/web Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,8 @@ public class MockHttpServletRequest implements HttpServletRequest {
159
159
160
160
private Principal userPrincipal ;
161
161
162
+ private String requestedSessionId ;
163
+
162
164
private String requestURI ;
163
165
164
166
private String servletPath = "" ;
@@ -761,9 +763,12 @@ public Principal getUserPrincipal() {
761
763
return this .userPrincipal ;
762
764
}
763
765
766
+ public void setRequestedSessionId (String requestedSessionId ) {
767
+ this .requestedSessionId = requestedSessionId ;
768
+ }
769
+
764
770
public String getRequestedSessionId () {
765
- HttpSession session = getSession ();
766
- return (session != null ? session .getId () : null );
771
+ return this .requestedSessionId ;
767
772
}
768
773
769
774
public void setRequestURI (String requestURI ) {
Original file line number Diff line number Diff line change @@ -159,6 +159,8 @@ public class MockHttpServletRequest implements HttpServletRequest {
159
159
160
160
private Principal userPrincipal ;
161
161
162
+ private String requestedSessionId ;
163
+
162
164
private String requestURI ;
163
165
164
166
private String servletPath = "" ;
@@ -761,9 +763,12 @@ public Principal getUserPrincipal() {
761
763
return this .userPrincipal ;
762
764
}
763
765
766
+ public void setRequestedSessionId (String requestedSessionId ) {
767
+ this .requestedSessionId = requestedSessionId ;
768
+ }
769
+
764
770
public String getRequestedSessionId () {
765
- HttpSession session = getSession ();
766
- return (session != null ? session .getId () : null );
771
+ return this .requestedSessionId ;
767
772
}
768
773
769
774
public void setRequestURI (String requestURI ) {
Original file line number Diff line number Diff line change @@ -159,6 +159,8 @@ public class MockHttpServletRequest implements HttpServletRequest {
159
159
160
160
private Principal userPrincipal ;
161
161
162
+ private String requestedSessionId ;
163
+
162
164
private String requestURI ;
163
165
164
166
private String servletPath = "" ;
@@ -761,9 +763,12 @@ public Principal getUserPrincipal() {
761
763
return this .userPrincipal ;
762
764
}
763
765
766
+ public void setRequestedSessionId (String requestedSessionId ) {
767
+ this .requestedSessionId = requestedSessionId ;
768
+ }
769
+
764
770
public String getRequestedSessionId () {
765
- HttpSession session = getSession ();
766
- return (session != null ? session .getId () : null );
771
+ return this .requestedSessionId ;
767
772
}
768
773
769
774
public void setRequestURI (String requestURI ) {
You can’t perform that action at this time.
0 commit comments