felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: svn commit: r1770706 - /felix/trunk/httplite/core/src/main/java/org/apache/felix/httplite/servlet/HttpServletRequestImpl.java
Date Tue, 22 Nov 2016 04:38:56 GMT
Hi Benson,

On Mon, Nov 21, 2016 at 9:07 PM,  <bimargulies@apache.org> wrote:
> +    private static final SimpleDateFormat formatsTemplate[] = {
> +            new SimpleDateFormat(HttpConstants.HTTP_DATE_FORMAT, Locale.US),
> +            new SimpleDateFormat("EEEEEE, dd-MMM-yy HH:mm:ss zzz", Locale.US),
> +            new SimpleDateFormat("EEE MMMM d HH:mm:ss yyyy", Locale.US)

SimpleDataFormat is not thread safe. So it would be better to just
have string array for template and create template instance each time

Chetan Mehrotra

Mime
View raw message