From fa52530928150f717cfed66d38bc2a7032e6e59c Mon Sep 17 00:00:00 2001 From: troshanin Date: Tue, 20 Jan 2015 19:22:51 +0300 Subject: [PATCH 1/2] Update UtcTimestampConverter.java --- .../java/quickfix/field/converter/UtcTimestampConverter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickfixj-core/src/main/java/quickfix/field/converter/UtcTimestampConverter.java b/quickfixj-core/src/main/java/quickfix/field/converter/UtcTimestampConverter.java index ae38518e22..fe27128b45 100644 --- a/quickfixj-core/src/main/java/quickfix/field/converter/UtcTimestampConverter.java +++ b/quickfixj-core/src/main/java/quickfix/field/converter/UtcTimestampConverter.java @@ -24,6 +24,7 @@ import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; +import java.util.concurrent.*; import quickfix.FieldConvertError; import quickfix.SystemTime; @@ -36,7 +37,7 @@ public class UtcTimestampConverter extends AbstractDateTimeConverter { private static ThreadLocal utcTimestampConverter = new ThreadLocal(); private final DateFormat utcTimestampFormat = createDateFormat("yyyyMMdd-HH:mm:ss"); private final DateFormat utcTimestampFormatMillis = createDateFormat("yyyyMMdd-HH:mm:ss.SSS"); - private static HashMap dateCache = new HashMap(); + private static ConcurrentHashMap dateCache = new ConcurrentHashMap(); /** * Convert a timestamp (represented as a Date) to a String. From f156eaad561ffed2c6e754c51b850a03037e6c36 Mon Sep 17 00:00:00 2001 From: troshanin Date: Wed, 21 Jan 2015 14:17:14 +0300 Subject: [PATCH 2/2] Update UtcTimestampConverter.java --- .../java/quickfix/field/converter/UtcTimestampConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickfixj-core/src/main/java/quickfix/field/converter/UtcTimestampConverter.java b/quickfixj-core/src/main/java/quickfix/field/converter/UtcTimestampConverter.java index fe27128b45..7f4ee53d31 100644 --- a/quickfixj-core/src/main/java/quickfix/field/converter/UtcTimestampConverter.java +++ b/quickfixj-core/src/main/java/quickfix/field/converter/UtcTimestampConverter.java @@ -37,7 +37,7 @@ public class UtcTimestampConverter extends AbstractDateTimeConverter { private static ThreadLocal utcTimestampConverter = new ThreadLocal(); private final DateFormat utcTimestampFormat = createDateFormat("yyyyMMdd-HH:mm:ss"); private final DateFormat utcTimestampFormatMillis = createDateFormat("yyyyMMdd-HH:mm:ss.SSS"); - private static ConcurrentHashMap dateCache = new ConcurrentHashMap(); + private final static ConcurrentHashMap dateCache = new ConcurrentHashMap(); /** * Convert a timestamp (represented as a Date) to a String.