internetarchive/wayback — pull request #44 by kngenie (2014-11-10 20:54:45+00:00)
Title: Use thread-local SimpleDateFormat objects for formatting Memento header dates

MementoUtils shares static SimpleDateFormat objects among threads for generating date text in Memento headers. This caused ArrayIndexOutBoundsException in global wayback, and often made wayback permanently crippled due to severe corruption of state inside SimpleDateFormat.

This patch uses SimpleDateFormat in ThreadLocal, a la ArchiveUtils.

(I just realized this is a duplicate work of https://github.com/ukwa/openwayback/commit/ccc4b6abf7b208506fdf19634fab776b4432e828 - this differs in that it uses ArchiveUtils for 14-digit timestamp).