Commit 474f5417 by Bryce McKinlay Committed by Bryce McKinlay

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
parent faebe6c2
2004-08-02 Bryce McKinlay <mckinlay@redhat.com> 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. * testsuite/libjava.compile/PR16701.java: New test.
2004-08-01 Andrew John Hughes <gnu_andrew@member.fsf.org> 2004-08-01 Andrew John Hughes <gnu_andrew@member.fsf.org>
......
...@@ -99,7 +99,11 @@ public class Timestamp extends java.util.Date ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment