tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
Date Mon, 09 Aug 2004 05:45:43 GMT

----- Original Message ----- 
From: <luehe@apache.org>
To: <jakarta-tomcat-catalina-cvs@apache.org>
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 ;-).


Mime
View raw message