Prefer multicatch for brevity

This commit is contained in:
Juan Martín Sotuyo Dodero
2017-06-12 19:11:15 -03:00
parent 0fc9ac185a
commit 435373faf7

View File

@ -39,27 +39,21 @@ public abstract class AbstractJUnitRule extends AbstractJavaRule {
try { try {
c = Class.forName(JUNIT3_CLASS_NAME); c = Class.forName(JUNIT3_CLASS_NAME);
} catch (ClassNotFoundException t) { } catch (ClassNotFoundException | NoClassDefFoundError t) {
c = null;
} catch (NoClassDefFoundError t) {
c = null; c = null;
} }
JUNIT3_CLASS = c; JUNIT3_CLASS = c;
try { try {
c = Class.forName(JUNIT4_CLASS_NAME); c = Class.forName(JUNIT4_CLASS_NAME);
} catch (ClassNotFoundException t) { } catch (ClassNotFoundException | NoClassDefFoundError t) {
c = null;
} catch (NoClassDefFoundError t) {
c = null; c = null;
} }
JUNIT4_CLASS = c; JUNIT4_CLASS = c;
try { try {
c = Class.forName(JUNIT5_CLASS_NAME); c = Class.forName(JUNIT5_CLASS_NAME);
} catch (ClassNotFoundException t) { } catch (ClassNotFoundException | NoClassDefFoundError t) {
c = null;
} catch (NoClassDefFoundError t) {
c = null; c = null;
} }
JUNIT5_CLASS = c; JUNIT5_CLASS = c;