sebb a écrit :

BTW, SimpleDateFormat is not synchronized, so having package-protected
instances (whether static or not) may cause problems if the class is
intended for multithreaded use.

I made so the usage of the static DateFormat is synchronized. The instance DateFormat isn't synchronized but its use by concurrent threads is unlikely. I can change it though if it's really an issue.


Also, the serialVersionUID should probably be changed as a new
instance field has been added.

The package name has changed, is it still necessary to change the UID ?


Perhaps consider using org.apache.commons.lang.time.FastDateFormat
from Commons Lang for at least the formatting part?

FastDateFormat could be useful to simplify the code on the 1.x branch, but for the 2.x code base I think SimpleDateFormat is good enough.

Emmanuel Bourg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to