Java 7: Identical 'catch' branches in 'try' statement

This commit is contained in:
Lars Grefer
2019-08-09 00:48:57 +02:00
committed by Rob Winch
parent 5e44a249f8
commit 25c06be1eb
5 changed files with 9 additions and 43 deletions

View File

@@ -77,10 +77,7 @@ public class ClientApplication {
System.out
.println("This client proxy factory does not have a setUsername(String) method");
}
catch (IllegalAccessException ignored) {
ignored.printStackTrace();
}
catch (InvocationTargetException ignored) {
catch (IllegalAccessException | InvocationTargetException ignored) {
ignored.printStackTrace();
}
@@ -98,9 +95,7 @@ public class ClientApplication {
System.out
.println("This client proxy factory does not have a setPassword(String) method");
}
catch (IllegalAccessException ignored) {
}
catch (InvocationTargetException ignored) {
catch (IllegalAccessException | InvocationTargetException ignored) {
}
System.out.println("Calling ContactManager '" + beanName + "'");