Prefer multicatch for brevity
This commit is contained in:
1 parent
0fc9ac185a
commit
435373faf7
1 file changed
+3
-9
+3
-9
@@ -39,27 +39,21 @@ public abstract class AbstractJUnitRule extends AbstractJavaRule {
|
||||
|
||||
try {
|
||||
c = Class.forName(JUNIT3_CLASS_NAME);
|
||||
} catch (ClassNotFoundException t) {
|
||||
c = null;
|
||||
} catch (NoClassDefFoundError t) {
|
||||
} catch (ClassNotFoundException | NoClassDefFoundError t) {
|
||||
c = null;
|
||||
}
|
||||
JUNIT3_CLASS = c;
|
||||
|
||||
try {
|
||||
c = Class.forName(JUNIT4_CLASS_NAME);
|
||||
} catch (ClassNotFoundException t) {
|
||||
c = null;
|
||||
} catch (NoClassDefFoundError t) {
|
||||
} catch (ClassNotFoundException | NoClassDefFoundError t) {
|
||||
c = null;
|
||||
}
|
||||
JUNIT4_CLASS = c;
|
||||
|
||||
try {
|
||||
c = Class.forName(JUNIT5_CLASS_NAME);
|
||||
} catch (ClassNotFoundException t) {
|
||||
c = null;
|
||||
} catch (NoClassDefFoundError t) {
|
||||
} catch (ClassNotFoundException | NoClassDefFoundError t) {
|
||||
c = null;
|
||||
}
|
||||
JUNIT5_CLASS = c;
|
||||
|
||||
Reference in new issue
Block a user