mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Rename exception variables in empty catch blocks
The Spring codebase sometimes ignores exceptions in catch blocks on purpose. This is often called out by an inline comment. We should make this more obvious by renaming the exception argument in the catch block to declare whether the exception is "ignored" or "expected". See gh-35047 Signed-off-by: Vincent Potucek <vpotucek@me.com> [brian.clozel@broadcom.com: rework commit message] Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
This commit is contained in:
committed by
Brian Clozel
parent
cd3ac44fb0
commit
0d4dfb6c1f
+1
-2
@@ -233,8 +233,7 @@ abstract class AbstractAopProxyTests {
|
||||
try {
|
||||
p2.echo(new IOException());
|
||||
}
|
||||
catch (IOException ex) {
|
||||
|
||||
catch (IOException ignored) {
|
||||
}
|
||||
assertThat(cta.getCalls()).isEqualTo(2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user