Use try/multi-catch for some reflection-related exceptions
There are more places in the code that could benefit from this but these are particularly egregious and easy to spot. Change-Id: Iccef1e03e6c36bb83bf6dc1397f54817dd05af33
This commit is contained in:
@@ -156,10 +156,7 @@ public final class GerritLauncher {
|
||||
final Method main;
|
||||
try {
|
||||
main = clazz.getMethod("main", argv.getClass());
|
||||
} catch (SecurityException e) {
|
||||
System.err.println("fatal: unknown command " + name);
|
||||
return 1;
|
||||
} catch (NoSuchMethodException e) {
|
||||
} catch (SecurityException | NoSuchMethodException e) {
|
||||
System.err.println("fatal: unknown command " + name);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user