kusalk commented on code in PR #663:
URL: https://github.com/apache/struts/pull/663#discussion_r1121748372


##########
core/src/test/java/org/apache/struts2/dispatcher/PrepareOperationsTest.java:
##########
@@ -73,6 +73,7 @@ public void testWrappedRequestCleanup() {
         });
         IntStream.range(0, mockedRecursions - 1).forEach(i -> 
prepare.cleanupWrappedRequest(req));
 
+        // Assert org.apache.struts2.dispatcher.Dispatcher#cleanUpRequest has 
not yet run

Review Comment:
   This comment was meant to clarify the intent of line 77. This unit test is 
testing that if prepare#wrapRequest is run X times, then 
prepare#cleanupWrappedRequest must also be run X times before the request is 
cleaned up. We do not want to clean up too early (line 77) and we don't want to 
forget to clean up (line 79). This scenario only occurs when requests are 
forwarded and the StrutsPrepareFilter executes recursively.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to