On Wednesday 18 September 2002 08:34 am, Henri Gomez wrote:
> > The upshot is that DateFormats need to be either thread local, or created
> > new each time.
>
> Created each time is exactly what we want to avoid ;)
Sacrificing correctness for speed isn't a great trade-off. After all, if it 
doesn't have to work, I can make it a LOT faster.

In this case, it looks like the problem with SimpleDateFormat is manageable 
with synchronization. SDF can leak some of its internal state with 
get/setCalendar. Since in the connectors DateTool, the formatter instance is 
private, and get/setCalendar is never called, syncing on the instance should 
be sufficient.

It looks like the same problem exists in catalina's DateTool.

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

Reply via email to