From 474f541727096df25c2268c462fcb8c4daa898b6 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Tue, 3 Aug 2004 00:21:26 +0000 Subject: Timestamp.java (valueOf): Synchronize access to dateFormat. 2004-08-02 Bryce McKinlay * java/sql/Timestamp.java (valueOf): Synchronize access to dateFormat. From-SVN: r85460 --- libjava/java/sql/Timestamp.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libjava/java/sql') diff --git a/libjava/java/sql/Timestamp.java b/libjava/java/sql/Timestamp.java index e480fff..b791ca1 100644 --- a/libjava/java/sql/Timestamp.java +++ b/libjava/java/sql/Timestamp.java @@ -99,7 +99,11 @@ public class Timestamp extends java.util.Date try { - java.util.Date d = (java.util.Date) dateFormat.parseObject(str); + java.util.Date d; + synchronized (dateFormat) + { + d = (java.util.Date) dateFormat.parseObject(str); + } if (d == null) throw new IllegalArgumentException(str); -- cgit v1.1