sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar Poce" <edgarp...@gmail.com>
Subject DateFormat is not thread safe
Date Fri, 14 Sep 2007 14:15:52 GMT
Hi,

I've just downloaded the Sling code and I found that the class
org.apache.sling.obr.Repository instantiates DateFormat
implementations statically and uses them in instance methods which are
not synchronized. I'm not familiarized with the code, I'm not sure
whether the access to those methods is synchronized somewhere else,
but if they are not the the DateFormat will generate wrong string
representations of the date under heavy load.

see http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html

br,
edgar

Mime
View raw message