--- Dominique Devienne <[EMAIL PROTECTED]> wrote:

> 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
> initialized?
> 
Certainly this could be done, but I was looking to
avoid the expense of multiple reflection-based checks.
 Do you think it would be better to store a Boolean so
that the call could still be made only once (triggered
by the null reference), but deferred until after
initialization?

-Matt

> --DD
> 
> On 7/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> 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:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to