peterreilly    2004/06/10 01:15:01

  Modified:    src/main/org/apache/tools/ant Target.java
  Log:
  always call fireTargetFinished to correspond to a fireTargetStarted
  
  Revision  Changes    Path
  1.54      +5 -3      ant/src/main/org/apache/tools/ant/Target.java
  
  Index: Target.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Target.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- Target.java       4 Jun 2004 15:39:16 -0000       1.53
  +++ Target.java       10 Jun 2004 08:15:01 -0000      1.54
  @@ -363,13 +363,15 @@
        * @see #execute()
        */
       public final void performTasks() {
  +        RuntimeException thrown = null;
  +        project.fireTargetStarted(this);
           try {
  -            project.fireTargetStarted(this);
               execute();
  -            project.fireTargetFinished(this, null);
           } catch (RuntimeException exc) {
  -            project.fireTargetFinished(this, exc);
  +            thrown = exc;
               throw exc;
  +        } finally {
  +            project.fireTargetFinished(this, thrown);
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to