From 2173865f92dae73be1e0cf462b871a7e2d26a878 Mon Sep 17 00:00:00 2001 From: hermens Date: Fri, 13 Feb 2009 11:59:50 +0000 Subject: [PATCH] Prevent race condition when switching timezones. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5605 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/kelondro/order/DateFormatter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/de/anomic/kelondro/order/DateFormatter.java b/source/de/anomic/kelondro/order/DateFormatter.java index 9703f0627..30e9357a9 100644 --- a/source/de/anomic/kelondro/order/DateFormatter.java +++ b/source/de/anomic/kelondro/order/DateFormatter.java @@ -397,10 +397,10 @@ public final class DateFormatter { /** called by all public format...(..., TimeZone) methods */ private static String format(final SimpleDateFormat format, final Date date, final TimeZone tz) { - final TimeZone bakTZ = format.getTimeZone(); String result; synchronized (format) { + final TimeZone bakTZ = format.getTimeZone(); format.setTimeZone(tz == null ? TZ_GMT : tz); result = format.format(date); format.setTimeZone(bakTZ);