ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r641903 - /ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java
Date Thu, 27 Mar 2008 17:09:55 GMT
Author: peterreilly
Date: Thu Mar 27 10:09:53 2008
New Revision: 641903

URL: http://svn.apache.org/viewvc?rev=641903&view=rev
Log:
Bugzilla 44689: NPE with multiple targets and id's in task

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java?rev=641903&r1=641902&r2=641903&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java Thu Mar 27 10:09:53 2008
@@ -288,11 +288,14 @@
                 ((Task) realThing).execute();
             }
         } finally {
-            // Finished executing the task, null it to allow
+            // Finished executing the task
+            // null it (unless it has an ID) to allow
             // GC do its job
             // If this UE is used again, a new "realthing" will be made
-            realThing = null;
-            getWrapper().setProxy(null);
+            if (getWrapper().getId() == null) {
+                realThing = null;
+                getWrapper().setProxy(null);
+            }
         }
     }
 



Mime
View raw message