diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 4 | ||||
-rw-r--r-- | libjava/java/sql/Timestamp.java | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 81922f2..52ac71c 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,9 @@ 2004-08-02 Bryce McKinlay <mckinlay@redhat.com> + * java/sql/Timestamp.java (valueOf): Synchronize access to dateFormat. + +2004-08-02 Bryce McKinlay <mckinlay@redhat.com> + * testsuite/libjava.compile/PR16701.java: New test. 2004-08-01 Andrew John Hughes <gnu_andrew@member.fsf.org> 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); |