Sorry if this is already posted. But this is one important thing to note:
DateFormat is not thread safe. Using it in two parallel threads cause corruption of data or runtime exception. Use jodatime where ever you can.
Acumen,
http://lucid-forums.com
Printable View
Sorry if this is already posted. But this is one important thing to note:
DateFormat is not thread safe. Using it in two parallel threads cause corruption of data or runtime exception. Use jodatime where ever you can.
Acumen,
http://lucid-forums.com
Indeed, this is what the API tells you.
I personally like using Joda-Time as well, its great. I believe the current Java API for dates is somewhat behind its time, hehe.Quote:
Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally.
// Json
Yeah, I agree with that.
Acumen,
Lucid forums
I thought this was a tip, just curious why is this moved to 'New to Java'.
Acumen,
Lucid forums
I think that makes sense. I really appreciate the effort you are putting in maintaining these forums.