[
https://issues.apache.org/jira/browse/HTTPCORE-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505593
]
Roland Weber commented on HTTPCORE-79:
--------------------------------------
You noticed that FastDateFormat is for formatting only, not for parsing?
Since this is obviously a case where multiple implementations are available and
have different advantages/drawbacks, maybe it is time to define an interface
and make DateUtils - in it's current form - the default implementation.
Optimizing static helper methods without a specified target environment is
soooooo ugly.
cheers,
Roland
> 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]