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
2 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue