How many of you use java.text.SimpleDateFormat as static field?
I have seen this to be pretty standard practice (and have done this myself too).
Be aware that SimpleDateFormat#format(..) is not thread-safe and thereby for most of the cases you should not use this as a static field in server, Eclipse RPC or any other multi-threaded environment.
SimpleDateFormat is internally using field “calendar” that is set with each #format(…) method call so that pretty much breaks the thread-safety.


RSS
LinkedIn
Facebook
One Comment
Well, Ahtik plug-in is the only acceptable option we have. It is very good on what it does, but some things could be much better if Eclipse had such feature already built-in. For example, I would like to have the word-wrap feature always on by default, instead of turning it on every time I open a file. Also, it could not change the line numbering because when an error occurs, the line number where the error happened is not the same as presented by the editor when the word wrapping is on.
I really don’t understand why the Eclipse developers are not good enough (or doesn’t appear to be) to code such simple feature, but are masters to code much more complex features. Maybe they didn’t give the necessary importance to the thing.
Right now I installed Ahtik plug-in in Zend Studio for Eclipse (yes, it have the same problem with word-wrapping), but it corrupted it… I can’t open Zend again… =(