[
https://issues.apache.org/jira/browse/HTTPCORE-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505591
]
Daniel Müller commented on HTTPCORE-79:
---------------------------------------
I searched for alternative approaches and digged up a FastDateFormat in
commons.lang[1], which is fully threadsafe. Maybe http-core could use this one.
I don't propose to introduce commons.lang as a dependency, but simply to
incorporate the FastDateFormat (partial or whole) as a util into http-core. The
code has no dependencies on the rest of commons.lang (only one call to
Validate).
Just some thoughts,
Daniel
[1]
http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/time/FastDateFormat.html
> DateUtils should cache SimpleDateFormat
> ---------------------------------------
>
> Key: HTTPCORE-79
> URL: https://issues.apache.org/jira/browse/HTTPCORE-79
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore
> Affects Versions: 4.0-alpha5
> Reporter: Daniel Müller
> Priority: Minor
> Fix For: 4.0-beta1
>
> Attachments: org.apache.http.util.patch
>
>
> DateUtils create a SimpleDateFormat for each invocation of #formatDate and
> #parseDate. This can be optimized if SimpleDateFormat instances are cached.
> Since SimpleDateFormat is not threadsafe, the cache must be threadlocal.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]