You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2016/11/22 04:38:56 UTC

Re: svn commit: r1770706 - /felix/trunk/httplite/core/src/main/java/org/apache/felix/httplite/servlet/HttpServletRequestImpl.java

Hi Benson,

On Mon, Nov 21, 2016 at 9:07 PM,  <bi...@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