Polish caught exception names
Prefer `ex` over `e`.
This commit is contained in:
@@ -105,7 +105,7 @@ public class JmxEndpointIntegrationTests {
|
||||
getMBeanInfo(mBeanServer, objectName);
|
||||
return true;
|
||||
}
|
||||
catch (InstanceNotFoundException e) {
|
||||
catch (InstanceNotFoundException ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,10 +50,10 @@ public class PrometheusScrapeEndpoint {
|
||||
TextFormat.write004(writer, this.collectorRegistry.metricFamilySamples());
|
||||
return writer.toString();
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (IOException ex) {
|
||||
// This actually never happens since StringWriter::write() doesn't throw any
|
||||
// IOException
|
||||
throw new RuntimeException("Writing metrics failed", e);
|
||||
throw new RuntimeException("Writing metrics failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -250,8 +250,8 @@ public class WebMvcMetricsFilterTests {
|
||||
result.set(this.mvc.perform(get("/api/c1/completableFuture/{id}", 1))
|
||||
.andExpect(request().asyncStarted()).andReturn());
|
||||
}
|
||||
catch (Exception e) {
|
||||
fail("Failed to execute async request", e);
|
||||
catch (Exception ex) {
|
||||
fail("Failed to execute async request", ex);
|
||||
}
|
||||
});
|
||||
backgroundRequest.start();
|
||||
|
||||
@@ -146,7 +146,7 @@ public class WebServicesAutoConfiguration {
|
||||
return this.applicationContext
|
||||
.getResources(ensureTrailingSlash(location) + pattern);
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (IOException ex) {
|
||||
return new Resource[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class JooqPropertiesTests {
|
||||
given(connection.getMetaData()).willReturn(metadata);
|
||||
given(ds.getConnection()).willReturn(connection);
|
||||
}
|
||||
catch (SQLException e) {
|
||||
catch (SQLException ex) {
|
||||
// Do nothing
|
||||
}
|
||||
return ds;
|
||||
|
||||
@@ -136,7 +136,7 @@ public class CustomHibernateJpaAutoConfigurationTests {
|
||||
given(dataSource.getConnection().getMetaData())
|
||||
.willReturn(mock(DatabaseMetaData.class));
|
||||
}
|
||||
catch (SQLException e) {
|
||||
catch (SQLException ex) {
|
||||
// Do nothing
|
||||
}
|
||||
return dataSource;
|
||||
|
||||
@@ -307,7 +307,7 @@ public class JpaPropertiesTests {
|
||||
given(connection.getMetaData()).willReturn(metadata);
|
||||
given(ds.getConnection()).willReturn(connection);
|
||||
}
|
||||
catch (SQLException e) {
|
||||
catch (SQLException ex) {
|
||||
// Do nothing
|
||||
}
|
||||
return ds;
|
||||
|
||||
@@ -158,7 +158,7 @@ public abstract class AbstractApplicationContextRunnerTests<T extends AbstractAp
|
||||
context.getClassLoader());
|
||||
fail("Should have thrown a ClassNotFoundException");
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
catch (ClassNotFoundException ex) {
|
||||
// expected
|
||||
}
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@ class Container implements TestRule {
|
||||
try {
|
||||
DockerClientFactory.instance().client();
|
||||
}
|
||||
catch (Throwable t) {
|
||||
catch (Throwable ex) {
|
||||
return new SkipStatement();
|
||||
}
|
||||
this.container = this.containerFactory.get();
|
||||
|
||||
@@ -62,8 +62,8 @@ public class Neo4jContainer extends Container {
|
||||
Unreliables.retryUntilTrue((int) this.startupTimeout.getSeconds(),
|
||||
TimeUnit.SECONDS, checkConnection(sessionFactory));
|
||||
}
|
||||
catch (TimeoutException e) {
|
||||
throw new IllegalStateException();
|
||||
catch (TimeoutException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user