Skip to content

Commit 3457e76

Browse files
committed
exchange the Object to Exception to remove the cast
1 parent f8f6fa5 commit 3457e76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/src/test/java/org/springframework/security/web/access/ExceptionTranslationFilterTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,9 @@ public void setMessageSourceWhenNotNullThenCanGet() {
293293
verify(source).getMessage(eq(code), any(), any());
294294
}
295295

296-
private FilterChain mockFilterChainWithException(Object exception) throws ServletException, IOException {
296+
private FilterChain mockFilterChainWithException(Exception exception) throws ServletException, IOException {
297297
FilterChain fc = mock(FilterChain.class);
298-
willThrow((Throwable) exception).given(fc)
298+
willThrow(exception).given(fc)
299299
.doFilter(any(HttpServletRequest.class), any(HttpServletResponse.class));
300300
return fc;
301301
}

0 commit comments

Comments
 (0)