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: r469781 - in /ant/core/trunk/src/main/org/apache/tools/ant: ProjectComponent.java types/AbstractFileSet.java types/DataType.java types/PatternSet.java
Date Wed, 01 Nov 2006 15:57:15 GMT
> I have decided that PatternSet.clone() should return also a reference rather than the
referenced object if the object is a reference.
>
> When the object is used, the different getters will bring the user back to the referenced
object.

The only little concern I had with this approach was that if the
referenced object was changed between the moment the referencer is
cloned, and the moment it effectively accesses the cloned referencer
instance (and thus the modified referenced instance), accessing the
cloned reference may gives a false sense of "security", the user
thinking the clone is private and won't change, despite the fact that
it's still "just" a proxy (reference in Ant terms) to another
instance, that one not cloned.

Confusing statement, I know ;-) --DD

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


Mime
View raw message