ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r739865 - /ant/core/trunk/src/main/org/apache/tools/ant/util/DateUtils.java
Date Sun, 01 Feb 2009 22:19:57 GMT
Author: jkf
Date: Sun Feb  1 22:19:57 2009
New Revision: 739865

URL: http://svn.apache.org/viewvc?rev=739865&view=rev
Log:
Another thread-unsafe date formatter

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

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/DateUtils.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/DateUtils.java?rev=739865&r1=739864&r2=739865&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/DateUtils.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/DateUtils.java Sun Feb  1 22:19:57 2009
@@ -221,7 +221,9 @@
             tzMarker.append("0");
         }
         tzMarker.append(minutes);
-        return DATE_HEADER_FORMAT.format(cal.getTime()) + tzMarker.toString();
+        synchronized (DATE_HEADER_FORMAT) {
+            return DATE_HEADER_FORMAT.format(cal.getTime()) + tzMarker.toString();
+        }
     }
 
     /**



Mime
View raw message