Polish caught exception names

Prefer `ex` over `e`.
This commit is contained in:
Phillip Webb
2018-05-02 13:30:10 -07:00
parent 3ee777e142
commit 64930d4e5b
16 changed files with 25 additions and 25 deletions

View File

@@ -205,7 +205,7 @@ class OnBeanCondition extends SpringBootCondition implements ConfigurationCondit
collectBeanNamesForAnnotation(names, beanFactory, annotationType,
considerHierarchy);
}
catch (ClassNotFoundException e) {
catch (ClassNotFoundException ex) {
// Continue
}
return StringUtils.toStringArray(names);

View File

@@ -349,10 +349,10 @@ public class ArtemisAutoConfigurationTests {
+ "' was not expected but got " + destination);
}
}
catch (JMSException e) {
catch (JMSException ex) {
if (shouldExist) {
throw new IllegalStateException("Destination '" + name
+ "' was expected but got " + e.getMessage());
+ "' was expected but got " + ex.getMessage());
}
}
return null;

View File

@@ -143,7 +143,7 @@ public class CustomHibernateJpaAutoConfigurationTests {
given(dataSource.getConnection().getMetaData())
.willReturn(mock(DatabaseMetaData.class));
}
catch (SQLException e) {
catch (SQLException ex) {
// Do nothing
}
return dataSource;

View File

@@ -221,7 +221,7 @@ public class JpaPropertiesTests {
given(connection.getMetaData()).willReturn(metadata);
given(ds.getConnection()).willReturn(connection);
}
catch (SQLException e) {
catch (SQLException ex) {
// Do nothing
}
return ds;

View File

@@ -210,7 +210,7 @@ public class SecurityAutoConfigurationTests {
manager.authenticate(new UsernamePasswordAuthenticationToken("foo", "wrong"));
fail("Expected BadCredentialsException");
}
catch (BadCredentialsException e) {
catch (BadCredentialsException ex) {
// expected
}
assertThat(listener.event)