Use multi-catch when possible

This commit is contained in:
Alexander Udalov
2017-04-01 00:33:19 +03:00
parent 34f0576135
commit 6aa0f7bb65
14 changed files with 16 additions and 68 deletions
@@ -184,10 +184,7 @@ public abstract class AbstractWriteFlagsTest extends CodegenTestCase {
Field field = klass.getDeclaredField(flag);
expectedAccess |= field.getInt(klass);
}
catch (NoSuchFieldException e) {
throw new IllegalArgumentException("Cannot find " + flag + " field in Opcodes class", e);
}
catch (IllegalAccessException e) {
catch (NoSuchFieldException | IllegalAccessException e) {
throw new IllegalArgumentException("Cannot find " + flag + " field in Opcodes class", e);
}
}