ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTestRunner.java
Date Fri, 10 Oct 2003 13:50:35 GMT
bodewig     2003/10/10 06:50:35

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTestRunner.java
  Log:
  Don't mask arbitrary exceptions when looking for a suite method.
  
  PR: 23033
  Submitted by:	Steven Segers <ssegers at kiala dot com>
  
  Revision  Changes    Path
  1.43      +2 -4      ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
  
  Index: JUnitTestRunner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- JUnitTestRunner.java	21 Sep 2003 20:20:03 -0000	1.42
  +++ JUnitTestRunner.java	10 Oct 2003 13:50:35 -0000	1.43
  @@ -247,11 +247,9 @@
               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
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message