This is a follow-up ticket for as request in #26282 where OncePerRequestFilter.isAsyncDispatch
might NPE.
In our case we were using a silly mockito mock in a test which was testing the MultiPartFilter
integration
HttpServletRequest request = mock( HttpServletRequest.class );
HttpServletResponse response = mock( HttpServletResponse.class );
multipartFilter.doFilter( request, response, mock( FilterChain.class ) );
Comment From: rstoyanchev
We can change it in this case because if you wanted an ASYNC
dispatch, you'd have to set it up. Per contract however getDispatcherType()
isn't supposed to return null
. There are other places where we test for REQUEST
and defaulting to "false" there wouldn't be a good idea.