You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create multiple Unmarshallers (one per thread) from the same StreamFactory
2. Unmarshall records with a date in each of the threads
What is the expected output? What do you see instead?
All records get unmarshalled correctely. Instead, Exceptions get thrown.
What version of BeanIO are you using? What JDK version?
BeanIO 2.1.0
Please provide any additional information below.
While the documentation claims that "All included BeanIO type handlers are
thread safe", DateTypeHandlerSupport potentially uses the same SimpleDateFormat
for multiple Unmarshaller instances. Since SimpleDateFormat is not thread-safe
this causes the behaviour as shown. Switching to a custom TypeHandler that uses
a thread-local SimpleDateFormat solves the problem.
Original issue reported on code.google.com by [email protected] on 24 Mar 2015 at 12:58
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 24 Mar 2015 at 12:58The text was updated successfully, but these errors were encountered: