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
This commit is contained in:
parent
faebe6c239
commit
474f541727
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
|
||||||
|
|
||||||
* testsuite/libjava.compile/PR16701.java: New test.
|
* testsuite/libjava.compile/PR16701.java: New test.
|
||||||
|
|
|
@ -99,7 +99,11 @@ public class Timestamp extends java.util.Date
|
||||||
|
|
||||||
try
|
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)
|
if (d == null)
|
||||||
throw new IllegalArgumentException(str);
|
throw new IllegalArgumentException(str);
|
||||||
|
|
Loading…
Reference in New Issue