Browse Source

Don't mask arbitrary exceptions when looking for a suite method.

PR: 23033
Submitted by:	Steven Segers <ssegers at kiala dot com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275444 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
23c05b409b
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java

+ 2
- 4
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java View File

@@ -247,11 +247,9 @@ public class JUnitTestRunner implements TestListener {
try {
// check if there is a suite method
suiteMethod = testClass.getMethod("suite", new Class[0]);
} catch (Exception e) {
} catch (NoSuchMethodException e) {
// no appropriate suite method found. We don't report any
// error here since it might be perfectly normal. We don't
// know exactly what is the cause, but we're doing exactly
// the same as JUnit TestRunner do. We swallow the exceptions.
// error here since it might be perfectly normal.
}
if (suiteMethod != null) {
// if there is a suite method available, then try


Loading…
Cancel
Save