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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to