Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Developers List »

Re: Merge 641903 from trunk to 1.7 branch?

Steve Loughran

2008-03-28

Replies:

Author LoginPost Reply
Stefan Bodewig wrote:
>> 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
>
> IMHO the bug is serious enough to be fixed in 1.7.1 final and should
> be merged into the branch.

+1. We could always do a quick beta 3 release with this change to see
that people are happy.

>
>> --- 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
>> @@(protected) @@
>>            ((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);
>> +        }
>>       }
>>    }
>
> Looks pretty save to me. This means we might be having a few
> tasks/types living longer than needed, but it seems to be the only way
> people can use ids in their build files and run multiple targets at
> the same time.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@(protected)
> For additional commands, e-mail: dev-help@(protected)
>


--
Steve Loughran            http://www.1060.org/blogxter/publish/5
Author: Ant in Action       http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@(protected)
For additional commands, e-mail: dev-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.