Skip to content

Commit 3139395

Browse files
committed
Fix typo in exceptionVariableName in EmptyCatchBlockCheck
This commit also changes to use "ignored" for exception variable names instead of "ignore". See gh-35047 Signed-off-by: Johnny Lim <[email protected]>
1 parent 12146c4 commit 3139395

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

spring-test/src/main/java/org/springframework/test/json/AbstractJsonContentAssert.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ void assertDoesNotHavePath() {
551551
read();
552552
throw failure(new JsonPathNotExpected(this.json, this.path));
553553
}
554-
catch (PathNotFoundException ignore) {
554+
catch (PathNotFoundException ignored) {
555555
}
556556
}
557557

spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ public static void closeChannel(Channel channel) {
9090
channel.close();
9191
}
9292
}
93-
catch (IOException ignore) {
93+
catch (IOException ignored) {
9494
}
9595
}
9696

9797
public static void deleteFile(Path file) {
9898
try {
9999
Files.delete(file);
100100
}
101-
catch (IOException ignore) {
101+
catch (IOException ignored) {
102102
}
103103
}
104104

spring-web/src/main/java/org/springframework/http/server/reactive/UndertowServerHttpResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public void closeSource() {
334334
try {
335335
this.source.close();
336336
}
337-
catch (IOException ignore) {
337+
catch (IOException ignored) {
338338
}
339339
}
340340

spring-web/src/main/java/org/springframework/web/client/RestClientUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static byte[] getBody(HttpInputMessage message) {
3939
try {
4040
return FileCopyUtils.copyToByteArray(message.getBody());
4141
}
42-
catch (IOException ignore) {
42+
catch (IOException ignored) {
4343
}
4444
return new byte[0];
4545
}

src/checkstyle/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck"/>
4141
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.AvoidNestedBlocksCheck"/>
4242
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.EmptyCatchBlockCheck">
43-
<property name="exceptionVariableName" value="expected|ignore"/>
43+
<property name="exceptionVariableName" value="expected|ignored"/>
4444
</module>
4545

4646
<!-- Class Design -->

0 commit comments

Comments
 (0)