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..7f4ee53d31 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 final static ConcurrentHashMap dateCache = new ConcurrentHashMap(); /** * Convert a timestamp (represented as a Date) to a String.