Skip to content

Commit 64930d4

Browse files
committed
Polish caught exception names
Prefer `ex` over `e`.
1 parent 3ee777e commit 64930d4

File tree

16 files changed

+25
-25
lines changed

16 files changed

+25
-25
lines changed

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cloudfoundry/CloudFoundrySecurityService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public Map<String, String> fetchTokenKeys() {
109109
return extractTokenKeys(this.restTemplate
110110
.getForObject(getUaaUrl() + "/token_keys", Map.class));
111111
}
112-
catch (HttpStatusCodeException e) {
112+
catch (HttpStatusCodeException ex) {
113113
throw new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
114114
"UAA not reachable");
115115
}

spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/statsd/StatsdMetricWriterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public void waitForMessage() {
151151
try {
152152
Thread.sleep(50L);
153153
}
154-
catch (InterruptedException e) {
154+
catch (InterruptedException ex) {
155155
Thread.currentThread().interrupt();
156156
}
157157
}

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private String[] getBeanNamesForAnnotation(
205205
collectBeanNamesForAnnotation(names, beanFactory, annotationType,
206206
considerHierarchy);
207207
}
208-
catch (ClassNotFoundException e) {
208+
catch (ClassNotFoundException ex) {
209209
// Continue
210210
}
211211
return StringUtils.toStringArray(names);

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ public Void doInJms(Session session) throws JMSException {
349349
+ "' was not expected but got " + destination);
350350
}
351351
}
352-
catch (JMSException e) {
352+
catch (JMSException ex) {
353353
if (shouldExist) {
354354
throw new IllegalStateException("Destination '" + name
355-
+ "' was expected but got " + e.getMessage());
355+
+ "' was expected but got " + ex.getMessage());
356356
}
357357
}
358358
return null;

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/CustomHibernateJpaAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public DataSource dataSource() {
143143
given(dataSource.getConnection().getMetaData())
144144
.willReturn(mock(DatabaseMetaData.class));
145145
}
146-
catch (SQLException e) {
146+
catch (SQLException ex) {
147147
// Do nothing
148148
}
149149
return dataSource;

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/JpaPropertiesTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private DataSource mockDataSource(String jdbcUrl) {
221221
given(connection.getMetaData()).willReturn(metadata);
222222
given(ds.getConnection()).willReturn(connection);
223223
}
224-
catch (SQLException e) {
224+
catch (SQLException ex) {
225225
// Do nothing
226226
}
227227
return ds;

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private void pingAuthenticationListener() {
210210
manager.authenticate(new UsernamePasswordAuthenticationToken("foo", "wrong"));
211211
fail("Expected BadCredentialsException");
212212
}
213-
catch (BadCredentialsException e) {
213+
catch (BadCredentialsException ex) {
214214
// expected
215215
}
216216
assertThat(listener.event)

spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerationRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ URI generateUrl(InitializrServiceMetadata metadata) {
359359

360360
return builder.build();
361361
}
362-
catch (URISyntaxException e) {
363-
throw new ReportableException("Invalid service URL (" + e.getMessage() + ")");
362+
catch (URISyntaxException ex) {
363+
throw new ReportableException("Invalid service URL (" + ex.getMessage() + ")");
364364
}
365365
}
366366

spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyManagementBomTransformation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ public ModelSource resolveModel(String groupId, String artifactId, String versio
222222
return new UrlModelSource(
223223
Grape.getInstance().resolve(null, dependency)[0].toURL());
224224
}
225-
catch (MalformedURLException e) {
226-
throw new UnresolvableModelException(e.getMessage(), groupId, artifactId,
225+
catch (MalformedURLException ex) {
226+
throw new UnresolvableModelException(ex.getMessage(), groupId, artifactId,
227227
version);
228228
}
229229
}

spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/maven/MavenSettingsReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ private class SpringBootSecDispatcher extends DefaultSecDispatcher {
116116
try {
117117
this._cipher = new DefaultPlexusCipher();
118118
}
119-
catch (PlexusCipherException e) {
120-
throw new IllegalStateException(e);
119+
catch (PlexusCipherException ex) {
120+
throw new IllegalStateException(ex);
121121
}
122122
}
123123

0 commit comments

Comments
 (0)