ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject Re: svn commit: r559096 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/
Date Tue, 24 Jul 2007 16:45:25 GMT
Matt, did you test this? You write that derive classes can override
delegateIteratorToList() to return false, but this is used to init a
class member of Path, i.e. the *super* class of the one supposed to do
the overriding...

Assuming a MyPath extends Path, Path's members and Ctors are called
before MyPath is initialized, so relying on virtual dispatch on a
class that's not been initialized yet is fraught with trouble. Perhaps
it works OK if MyPath.delegateIteratorToList() just returns false, but
why not simply forgo the caching into preserveBC and systematically
call delegateIteratorToList() when needed, at a time MyPath is fully


On 7/24/07, <> wrote:
> +    private final boolean preserveBC = delegateIteratorToList();

> +    /**
> +     * that implements <code>list()</code>; this can, of course, be avoided
by overriding
> +     * this method to return <code>false</code>. It is not expected that
the result of this

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message