You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ad...@apache.org on 2002/03/02 04:56:23 UTC

cvs commit: jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon AbstractMyrmidonTest.java

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>