ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon AbstractMyrmidonTest.java
Date Sat, 02 Mar 2002 03:56:23 GMT
adammurdoch    02/03/01 19:56:23

  Modified:    proposal/myrmidon/src/testcases/org/apache/myrmidon
                        AbstractMyrmidonTest.java
  Log:
  Fix exception checking in unit tests.
  
  Revision  Changes    Path
  1.7       +3 -9      jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/AbstractMyrmidonTest.java
  
  Index: AbstractMyrmidonTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/AbstractMyrmidonTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractMyrmidonTest.java	1 Mar 2002 08:54:34 -0000	1.6
  +++ AbstractMyrmidonTest.java	2 Mar 2002 03:56:23 -0000	1.7
  @@ -10,7 +10,7 @@
   import java.io.File;
   import java.io.IOException;
   import junit.framework.TestCase;
  -import org.apache.avalon.framework.CascadingThrowable;
  +import org.apache.avalon.framework.ExceptionUtil;
   import org.apache.avalon.framework.logger.LogKitLogger;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.log.Hierarchy;
  @@ -115,14 +115,8 @@
                   assertEquals( message, current.getMessage() );
               }
   
  -            if( current instanceof CascadingThrowable )
  -            {
  -                current = ( (CascadingThrowable)current ).getCause();
  -            }
  -            else
  -            {
  -                current = null;
  -            }
  +            // Get the next exception in the chain
  +            current = ExceptionUtil.getCause( current, true );
           }
       }
   
  
  
  

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


Mime
View raw message