diff options
| author | Bryce McKinlay <mckinlay@redhat.com> | 2004-08-03 00:21:04 +0000 |
|---|---|---|
| committer | Bryce McKinlay <mckinlay@redhat.com> | 2004-08-03 00:21:04 +0000 |
| commit | a577a80c4415417f0ef8150c971b7ed6f05399c7 (patch) | |
| tree | f4020ac0242258d4ef039330732c722cf735305d /java/sql | |
| parent | 29540215156e35204f1ee1cf96d0b530a818259a (diff) | |
| download | classpath-a577a80c4415417f0ef8150c971b7ed6f05399c7.tar.gz | |
2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
* java/sql/Timestamp.java (valueOf): Synchronize access to
dateFormat.
Diffstat (limited to 'java/sql')
| -rw-r--r-- | java/sql/Timestamp.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/sql/Timestamp.java b/java/sql/Timestamp.java index e480fff6b..b791ca1e0 100644 --- a/java/sql/Timestamp.java +++ b/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); |
