ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: svn commit: r559096 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/Path.java
Date Tue, 24 Jul 2007 18:34:45 GMT
On 7/24/07, Matt Benson <gudnabrsam@yahoo.com> wrote:
> --- Dominique Devienne <ddevienne@gmail.com> wrote:
> 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?

Well, I think Java does provide you with virtual dispatch in this
case, unlike C++ (the vtable hasn't been setup yet properly), but as I
said, calling a derived virtual method from a base class is best
avoided.

Adding the preserveBC member isn't exactly great in the first place,
so adding another to know if the first was initialized is so so. Yet I
don't see a way around it... --DD

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


Mime
View raw message