diff options
author | Bryce McKinlay <mckinlay@redhat.com> | 2004-08-03 00:21:26 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2004-08-03 01:21:26 +0100 |
commit | 474f541727096df25c2268c462fcb8c4daa898b6 (patch) | |
tree | 7fbb9888b13eb5c1dc0cdccd65293ade0df3fbe3 /libjava/java/sql | |
parent | faebe6c2395d5f84c8333ab7398c61097281644c (diff) | |
download | gcc-474f541727096df25c2268c462fcb8c4daa898b6.zip gcc-474f541727096df25c2268c462fcb8c4daa898b6.tar.gz gcc-474f541727096df25c2268c462fcb8c4daa898b6.tar.bz2 |
Timestamp.java (valueOf): Synchronize access to dateFormat.
2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
* java/sql/Timestamp.java (valueOf): Synchronize access to
dateFormat.
From-SVN: r85460
Diffstat (limited to 'libjava/java/sql')
-rw-r--r-- | libjava/java/sql/Timestamp.java | 6 |
1 files changed, 5 insertions, 1 deletions
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); |