ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: Test Failures
Date Tue, 08 Jul 2003 08:00:48 GMT
On Mon, 2003-07-07 at 09:37, Stefan Bodewig wrote:
> On 07 Jul 2003, peter reilly <peter.reilly@corvil.com> wrote:
> 
> > I am not sure that that depending on an undocumented (I think)
> > feature of Vector/Enumeration is a good idea.
> 
> I agree, though it is sort-of documented in Vector's javadocs (the
> class description).
> 
> ,----
> |  The Iterators returned by Vector's iterator and listIterator methods
> |  are fail-fast: if the Vector is structurally modified at any time
> |  after the Iterator is created, in any way except through the
> |  Iterator's own remove or add methods, the Iterator will throw a
> |  ConcurrentModificationException. Thus, in the face of concurrent
> |  modification, the Iterator fails quickly and cleanly, rather than
> |  risking arbitrary, non-deterministic behavior at an undetermined time
> |  in the future. The Enumerations returned by Vector's elements method
> |  are not fail-fast.
> `----
Missed that, I should look at the javadocs as well as the code ;-)

> 
> So if we agreed that it is OK to add/remove tasks to the target
> currently being executed, we simply needed to provide a better
> implemenntation than the old one. 8-)
It would be difficult to provide a different implementation.
> 
> I tend to agree that we shouldn't allow that use-case, which leaves us
> at the point that we need to document it.  Doing it in the javadocs of
> Target is one place, <script>'s documentation and the developer
> section of the manual as well - any other places?

Those should be more that sufficient.

A thing to note though is that the script task, and any custom task
can interact with the Ant runtime mechanism. This is a good thing, but
one needs to be extremely careful as internal ant mechanisms may change
from release to release, even if the api does not change.

Peter



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


Mime
View raw message