Polish caught exception names
Prefer `ex` over `e`.
This commit is contained in:
@@ -109,7 +109,7 @@ class CloudFoundrySecurityService {
|
||||
return extractTokenKeys(this.restTemplate
|
||||
.getForObject(getUaaUrl() + "/token_keys", Map.class));
|
||||
}
|
||||
catch (HttpStatusCodeException e) {
|
||||
catch (HttpStatusCodeException ex) {
|
||||
throw new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
|
||||
"UAA not reachable");
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ public class StatsdMetricWriterTests {
|
||||
try {
|
||||
Thread.sleep(50L);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -359,8 +359,8 @@ class ProjectGenerationRequest {
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
catch (URISyntaxException e) {
|
||||
throw new ReportableException("Invalid service URL (" + e.getMessage() + ")");
|
||||
catch (URISyntaxException ex) {
|
||||
throw new ReportableException("Invalid service URL (" + ex.getMessage() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -222,8 +222,8 @@ public class DependencyManagementBomTransformation
|
||||
return new UrlModelSource(
|
||||
Grape.getInstance().resolve(null, dependency)[0].toURL());
|
||||
}
|
||||
catch (MalformedURLException e) {
|
||||
throw new UnresolvableModelException(e.getMessage(), groupId, artifactId,
|
||||
catch (MalformedURLException ex) {
|
||||
throw new UnresolvableModelException(ex.getMessage(), groupId, artifactId,
|
||||
version);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ public class MavenSettingsReader {
|
||||
try {
|
||||
this._cipher = new DefaultPlexusCipher();
|
||||
}
|
||||
catch (PlexusCipherException e) {
|
||||
throw new IllegalStateException(e);
|
||||
catch (PlexusCipherException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ class JsonReader {
|
||||
try {
|
||||
return Deprecation.Level.valueOf(value.toUpperCase(Locale.ENGLISH));
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
catch (IllegalArgumentException ex) {
|
||||
// let's use the default
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ public class TestConfigurationMetadataAnnotationProcessor
|
||||
}
|
||||
return this.metadata;
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException("Failed to read metadata from disk", e);
|
||||
catch (IOException ex) {
|
||||
throw new RuntimeException("Failed to read metadata from disk", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ abstract class JvmUtils {
|
||||
return new File(System.getProperty("java.home")).toURI().toURL()
|
||||
.toExternalForm();
|
||||
}
|
||||
catch (MalformedURLException e) {
|
||||
throw new IllegalStateException("Cannot locate java.home", e);
|
||||
catch (MalformedURLException ex) {
|
||||
throw new IllegalStateException("Cannot locate java.home", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -529,8 +529,8 @@ public class UndertowEmbeddedServletContainerFactory
|
||||
root = (root != null ? root : createTempDir("undertow-docbase"));
|
||||
return root.getCanonicalFile();
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new IllegalStateException("Cannot get canonical document root", e);
|
||||
catch (IOException ex) {
|
||||
throw new IllegalStateException("Cannot get canonical document root", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,8 +127,8 @@ public class DataSourceXAResourceRecoveryHelper
|
||||
try {
|
||||
this.xaConnection.close();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
logger.warn("Failed to close connection", e);
|
||||
catch (SQLException ex) {
|
||||
logger.warn("Failed to close connection", ex);
|
||||
}
|
||||
finally {
|
||||
this.xaConnection = null;
|
||||
|
||||
@@ -177,8 +177,8 @@ public class SpringApplicationAdminMXBeanRegistrarTests {
|
||||
try {
|
||||
return new ObjectName(jmxName);
|
||||
}
|
||||
catch (MalformedObjectNameException e) {
|
||||
throw new IllegalStateException("Invalid jmx name " + jmxName, e);
|
||||
catch (MalformedObjectNameException ex) {
|
||||
throw new IllegalStateException("Invalid jmx name " + jmxName, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user