Code Review 6965924: java.net.HttpCookie using static SimpleDateFormat which is not thread safe
gustav.trede at gmail.com
Wed Aug 18 03:28:49 PDT 2010
On 18 August 2010 12:10, Chris Hegarty <chris.hegarty at oracle.com> wrote:
> java.net.HttpCookie uses static SimpleDateFormat which is not thread safe.
> I think the best solution here is to simply create local SimpleDateFormat as
Why not use a threadlocal dateformater ?.
For certain cases Its also viable to exploit the fact that its enough to
generate a new value once per second for HTTP timestamps.
Even if its not "needed", it would imo be nice if the JDK code itself could
somehow act as reference / good examples of how to THINK(design) and
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the net-dev