1
1
/*
2
- * Copyright 2014-2022 the original author or authors.
2
+ * Copyright 2014-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
30
30
import jakarta .servlet .http .HttpServletRequestWrapper ;
31
31
import jakarta .servlet .http .HttpServletResponse ;
32
32
import jakarta .servlet .http .HttpSession ;
33
-
34
33
import org .apache .commons .logging .Log ;
35
34
import org .apache .commons .logging .LogFactory ;
36
35
@@ -205,7 +204,7 @@ private final class SessionRepositoryRequestWrapper extends HttpServletRequestWr
205
204
206
205
private boolean requestedSessionInvalidated ;
207
206
208
- private boolean hasCommitedInInclude ;
207
+ private boolean hasCommittedInInclude ;
209
208
210
209
private SessionRepositoryRequestWrapper (HttpServletRequest request , HttpServletResponse response ) {
211
210
super (request );
@@ -340,7 +339,7 @@ public String getRequestedSessionId() {
340
339
@ Override
341
340
public RequestDispatcher getRequestDispatcher (String path ) {
342
341
RequestDispatcher requestDispatcher = super .getRequestDispatcher (path );
343
- return new SessionCommittingRequestDispatcher (requestDispatcher , this );
342
+ return new SessionCommittingRequestDispatcher (requestDispatcher );
344
343
}
345
344
346
345
private S getRequestedSession () {
@@ -399,11 +398,8 @@ private final class SessionCommittingRequestDispatcher implements RequestDispatc
399
398
400
399
private final RequestDispatcher delegate ;
401
400
402
- private final SessionRepositoryRequestWrapper wrapper ;
403
-
404
- SessionCommittingRequestDispatcher (RequestDispatcher delegate , SessionRepositoryRequestWrapper wrapper ) {
401
+ SessionCommittingRequestDispatcher (RequestDispatcher delegate ) {
405
402
this .delegate = delegate ;
406
- this .wrapper = wrapper ;
407
403
}
408
404
409
405
@ Override
@@ -413,9 +409,9 @@ public void forward(ServletRequest request, ServletResponse response) throws Ser
413
409
414
410
@ Override
415
411
public void include (ServletRequest request , ServletResponse response ) throws ServletException , IOException {
416
- if (!this .wrapper . hasCommitedInInclude ) {
412
+ if (!SessionRepositoryRequestWrapper . this .hasCommittedInInclude ) {
417
413
SessionRepositoryRequestWrapper .this .commitSession ();
418
- this .wrapper . hasCommitedInInclude = true ;
414
+ SessionRepositoryRequestWrapper . this .hasCommittedInInclude = true ;
419
415
}
420
416
this .delegate .include (request , response );
421
417
}
0 commit comments