Synchronization
Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concur
Yes SimpleDateFormat is not thread safe and it is also recommended when you are parsing date it should access in synchronized manner.
public Date convertStringToDate(String dateString) throws ParseException {
Date result;
synchronized(df) {
result = df.parse(dateString);
}
return result;
}
one other way is on http://code.google.com/p/safe-simple-date-format/downloads/list