ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Voigt" <tv_spam...@gmx.de>
Subject Re: ConcurrentModificationException
Date Thu, 11 Jan 2007 19:24:23 GMT
Hi,

-------- Original-Nachricht --------
Datum: Thu, 11 Jan 2007 19:13:30 +0000
Von: "Peter Reilly" <peter.kitt.reilly@gmail.com>
An: "Ant Users List" <user@ant.apache.org>
Betreff: Re: ConcurrentModificationException

> Looking at the code and the stack error, the following patch may
> fix the problem:
> Index: src/main/org/apache/tools/ant/PropertyHelper.java
> ===================================================================
> --- src/main/org/apache/tools/ant/PropertyHelper.java   (revision 495336)
> +++ src/main/org/apache/tools/ant/PropertyHelper.java   (working copy)
> @@ -470,7 +470,9 @@
>       *         (including user properties).
>       */
>      public Hashtable getProperties() {
> -        return new Hashtable(properties);
> +        synchronized (properties) {
> +            return new Hashtable(properties);
> +        }
>          // There is a better way to save the context. This shouldn't
>          // delegate to next, it's for backward compatibility only.
>      }

I'll give it a try. Thanks for the fast response.

Best regards, Thomas

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


Mime
View raw message