*) adding synchronization block because SimpleDateFormat is not thread-safe

See: http://www.yacy-forum.de/viewtopic.php?p=26906#26906

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2809 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 92f774edd1
commit b357a13e9a

@ -545,7 +545,15 @@ public final class httpc {
*/
public static String dateString(Date date) {
if (date == null) return "";
return HTTPGMTFormatter.format(date);
/*
* This synchronized is needed because SimpleDateFormat
* is not thread-safe.
* See: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6231579
*/
synchronized(HTTPGMTFormatter) {
return HTTPGMTFormatter.format(date);
}
}
/**

Loading…
Cancel
Save