Bill Barker wrote:

----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 05, 2004 6:27 PM
Subject: cvs commit:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector
Request.java





luehe       2004/08/05 18:27:50

Modified: catalina/src/share/org/apache/catalina/connector
Request.java
Log:
Avoid allocating SimpleDateFormat[] for each request. Instead, declare


SimpleDateFormat[] as static and use static initializer to initialize it.



-1. SimpleDateFormat isn't thread-safe, so you can't have multiple threads accessing them. That's why they were instance variables, so that one one thread would ever be accessing them.



This is consistent with SimpleDateFormat[] in


org.apache.tomcat.util.http.FastHttpDateFormat.

Which is well known to be broken ;-).


There's a misunderstanding about the design (I don't think FastHttpDateFormat is that broken anyway ;) ). The formats passed in argument has to be thread local, and FHDF won't sync.

So -1 too.

Rémy


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



Reply via email to