ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r557045 - /ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
Date Tue, 17 Jul 2007 20:20:18 GMT
Author: mbenson
Date: Tue Jul 17 13:20:17 2007
New Revision: 557045

URL: http://svn.apache.org/viewvc?view=rev&rev=557045
Log:
refine clone()

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java?view=diff&rev=557045&r1=557044&r2=557045
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java Tue Jul 17 13:20:17 2007
@@ -950,10 +950,14 @@
      * @return the cloned PropertyHelper.
      * @since Ant 1.8
      */
-    public Object clone() {
+    public synchronized Object clone() {
         PropertyHelper result;
         try {
             result = (PropertyHelper) super.clone();
+            result.delegates = (Hashtable) delegates.clone();
+            result.properties = (Hashtable) properties.clone();
+            result.userProperties = (Hashtable) userProperties.clone();
+            result.inheritedProperties = (Hashtable) inheritedProperties.clone();
         } catch (CloneNotSupportedException e) {
             throw new BuildException(e);
         }



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


Mime
View raw message