You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jeremy Boynes <jb...@apache.org> on 2010/06/28 00:22:02 UTC

[taglibs] Thread safety in FormatDateSupport

I was looking at a patch for FormatDateSupport [1] to remove its dependency on a copy of LRUMap taken from Commons and have a question on the thread safety involved as, although the cache is synchronized, the formatters it contains are used outside that block.

This was discussed in bug 32311 [2] but the synchronization code suggested there wasn't added. Am I missing something, or should I reopen 32311 and add a patch?
--
Jeremy

[1] http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/fmt/FormatDateSupport.java
[2] https://issues.apache.org/bugzilla/show_bug.cgi?id=32311#c4