peterreilly 2004/06/10 01:23:51
Modified: src/main/org/apache/tools/ant Task.java
Log:
Always call taskfinished if taskstarted has been called
Revision Changes Path
1.57 +5 -3 ant/src/main/org/apache/tools/ant/Task.java
Index: Task.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Task.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- Task.java 9 Mar 2004 16:47:59 -0000 1.56
+++ Task.java 10 Jun 2004 08:23:50 -0000 1.57
@@ -357,11 +357,11 @@
*/
public final void perform() {
if (!invalid) {
+ getProject().fireTaskStarted(this);
+ Throwable reason = null;
try {
- getProject().fireTaskStarted(this);
maybeConfigure();
execute();
- getProject().fireTaskFinished(this, null);
} catch (RuntimeException exc) {
if (exc instanceof BuildException) {
BuildException be = (BuildException) exc;
@@ -369,8 +369,10 @@
be.setLocation(getLocation());
}
}
- getProject().fireTaskFinished(this, exc);
+ reason = exc;
throw exc;
+ } finally {
+ getProject().fireTaskFinished(this, reason);
}
} else {
UnknownElement ue = getReplacement();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]