Details
-
Type: Bug
-
Status: Closed
-
Priority: Critical
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: 0.6
-
Component/s: Converters
-
Labels:None
Description
XStream should be thread safe, but some of the converters use DateFormat.. which isn't.
Here's something that exposes it....
final DateFormat df = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss.sss");
Runnable r = new Runnable() {
public void run() {
for (int i = 0; i < 100; i++) {
try
catch (ParseException e)
{ e.printStackTrace(); } //Object o = xStreamMarshaller.unmarshal(s);
}
System.out.println("done");
}
};
for(int i = 0; i < 100; i++)
{ new Thread(r).start(); }
Already reported
XSTR-48