@@ -325,9 +325,7 @@ public void doFilter(ServletRequest request, ServletResponse response)
325325 @ Test
326326 public void responseIsNotCommitedWhenRequestIsAsync () throws Exception {
327327 this .request .setAsyncStarted (true );
328-
329328 this .filter .doFilter (this .request , this .response , this .chain );
330-
331329 assertThat (this .chain .getRequest (), equalTo ((ServletRequest ) this .request ));
332330 assertThat (((HttpServletResponseWrapper ) this .chain .getResponse ()).getResponse (),
333331 equalTo ((ServletResponse ) this .response ));
@@ -347,9 +345,7 @@ public void doFilter(ServletRequest request, ServletResponse response)
347345 throw new RuntimeException ("BAD" );
348346 }
349347 };
350-
351348 this .filter .doFilter (this .request , this .response , this .chain );
352-
353349 assertThat (this .chain .getRequest (), equalTo ((ServletRequest ) this .request ));
354350 assertThat (((HttpServletResponseWrapper ) this .chain .getResponse ()).getResponse (),
355351 equalTo ((ServletResponse ) this .response ));
@@ -368,9 +364,7 @@ public void doFilter(ServletRequest request, ServletResponse response)
368364 ((HttpServletResponse ) response ).sendError (400 , "BAD" );
369365 }
370366 };
371-
372367 this .filter .doFilter (this .request , this .response , this .chain );
373-
374368 assertThat (this .chain .getRequest (), equalTo ((ServletRequest ) this .request ));
375369 assertThat (((HttpServletResponseWrapper ) this .chain .getResponse ()).getResponse (),
376370 equalTo ((ServletResponse ) this .response ));
@@ -380,9 +374,7 @@ public void doFilter(ServletRequest request, ServletResponse response)
380374 @ Test
381375 public void responseIsNotCommitedDuringAsyncDispatch () throws Exception {
382376 setUpAsyncDispatch ();
383-
384377 this .filter .doFilter (this .request , this .response , this .chain );
385-
386378 assertThat (this .chain .getRequest (), equalTo ((ServletRequest ) this .request ));
387379 assertThat (((HttpServletResponseWrapper ) this .chain .getResponse ()).getResponse (),
388380 equalTo ((ServletResponse ) this .response ));
@@ -402,9 +394,7 @@ public void doFilter(ServletRequest request, ServletResponse response)
402394 throw new RuntimeException ("BAD" );
403395 }
404396 };
405-
406397 this .filter .doFilter (this .request , this .response , this .chain );
407-
408398 assertThat (this .chain .getRequest (), equalTo ((ServletRequest ) this .request ));
409399 assertThat (((HttpServletResponseWrapper ) this .chain .getResponse ()).getResponse (),
410400 equalTo ((ServletResponse ) this .response ));
@@ -424,9 +414,7 @@ public void doFilter(ServletRequest request, ServletResponse response)
424414 ((HttpServletResponse ) response ).sendError (400 , "BAD" );
425415 }
426416 };
427-
428417 this .filter .doFilter (this .request , this .response , this .chain );
429-
430418 assertThat (this .chain .getRequest (), equalTo ((ServletRequest ) this .request ));
431419 assertThat (((HttpServletResponseWrapper ) this .chain .getResponse ()).getResponse (),
432420 equalTo ((ServletResponse ) this .response ));
@@ -439,9 +427,7 @@ public void responseIsNotFlushedIfStatusIsLessThan400AndItHasAlreadyBeenCommitte
439427 HttpServletResponse committedResponse = mock (HttpServletResponse .class );
440428 given (committedResponse .isCommitted ()).willReturn (true );
441429 given (committedResponse .getStatus ()).willReturn (200 );
442-
443430 this .filter .doFilter (this .request , committedResponse , this .chain );
444-
445431 verify (committedResponse , times (0 )).flushBuffer ();
446432 }
447433
0 commit comments