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 JUnitTask.java
Date Wed, 06 Oct 2004 15:40:57 GMT
bodewig     2004/10/06 08:40:57

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/junit Tag:
                        ANT_16_BRANCH JUnitTask.java
  Log:
  Merge fix for 27420
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.83.2.14 +18 -9     ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.83.2.13
  retrieving revision 1.83.2.14
  diff -u -r1.83.2.13 -r1.83.2.14
  --- JUnitTask.java	27 Jul 2004 14:25:11 -0000	1.83.2.13
  +++ JUnitTask.java	6 Oct 2004 15:40:56 -0000	1.83.2.14
  @@ -641,14 +641,20 @@
               testLists.addAll(executeOrQueue(tests.elements(), forkPerTest));
           }
   
  -        Iterator iter = testLists.iterator();
  -        while (iter.hasNext()) {
  -            List l = (List) iter.next();
  -            if (l.size() == 1) {
  -                execute((JUnitTest) l.get(0));
  -            } else {
  -                execute(l);
  -            }            
  +        try {
  +            Iterator iter = testLists.iterator();
  +            while (iter.hasNext()) {
  +                List l = (List) iter.next();
  +                if (l.size() == 1) {
  +                    execute((JUnitTest) l.get(0));
  +                } else {
  +                    execute(l);
  +                }            
  +            }
  +        } finally {
  +            if (classLoader != null && reloading) {
  +                classLoader.cleanup();
  +            }
           }
       }
   
  @@ -1066,6 +1072,9 @@
               }
               if (classLoader != null) {
                   classLoader.resetThreadContextLoader();
  +                if (!reloading) {
  +                    classLoader.cleanup();
  +                }
               }
           }
       }
  
  
  

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


Mime
View raw message