Update exception variable names
Consistently use `ex` for caught exception and `cause` for Exception constructor arguments. Issue gh-8945
This commit is contained in:
@@ -240,11 +240,11 @@ public class AuthenticationFilterTests {
|
||||
try {
|
||||
filter.doFilter(request, response, chain);
|
||||
}
|
||||
catch (ServletException e) {
|
||||
catch (ServletException ex) {
|
||||
verifyZeroInteractions(this.successHandler);
|
||||
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
|
||||
|
||||
throw e;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ public class UsernamePasswordAuthenticationFilterTests {
|
||||
filter.attemptAuthentication(request, new MockHttpServletResponse());
|
||||
fail("Expected AuthenticationException");
|
||||
}
|
||||
catch (AuthenticationException e) {
|
||||
catch (AuthenticationException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ public class HttpStatusReturningLogoutSuccessHandlerTests {
|
||||
try {
|
||||
new HttpStatusReturningLogoutSuccessHandler(null);
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
assertThat(e).hasMessage("The provided HttpStatus must not be null.");
|
||||
catch (IllegalArgumentException ex) {
|
||||
assertThat(ex).hasMessage("The provided HttpStatus must not be null.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ public class Http403ForbiddenEntryPointTests {
|
||||
assertThat(resp.getStatus()).withFailMessage("Incorrect status")
|
||||
.isEqualTo(HttpServletResponse.SC_FORBIDDEN);
|
||||
}
|
||||
catch (IOException e) {
|
||||
fail("Unexpected exception thrown: " + e);
|
||||
catch (IOException ex) {
|
||||
fail("Unexpected exception thrown: " + ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ThrowableAnalyzerTests {
|
||||
|
||||
fail("IllegalArgumentExpected");
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
catch (IllegalArgumentException ex) {
|
||||
// ok
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@ public class ThrowableAnalyzerTests {
|
||||
ThrowableAnalyzer.verifyThrowableHierarchy(null, Throwable.class);
|
||||
fail("IllegalArgumentException expected");
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
catch (IllegalArgumentException ex) {
|
||||
// ok
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ public class ThrowableAnalyzerTests {
|
||||
ThrowableAnalyzer.verifyThrowableHierarchy(throwable, InvocationTargetException.class);
|
||||
fail("IllegalArgumentException expected");
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
catch (IllegalArgumentException ex) {
|
||||
// ok
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user