Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.1
-
Unknown
Description
Headers.getHttpDateFormat() indirectly calls TimeZone.getTimeZone("GMT"), which calls into JRE lib method causing monitor contention. See screen shot
Fix by instantiate into static variable.
private static TimeZone tZone = TimeZone.getTimeZone("GMT"); public static SimpleDateFormat getHttpDateFormat() { SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US); dateFormat.setTimeZone(tZone); return dateFormat; }