Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.0.1
-
Component/s: Transports
-
Labels:
-
Estimated Complexity: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; }