Code cleanup
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1713455 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6ab2c32970
commit
70e603f819
|
@ -199,8 +199,7 @@ public final class DateUtils {
|
|||
*/
|
||||
final static class DateFormatHolder {
|
||||
|
||||
private static final ThreadLocal<SoftReference<Map<String, SimpleDateFormat>>>
|
||||
THREADLOCAL_FORMATS = new ThreadLocal<>();
|
||||
private static final ThreadLocal<SoftReference<Map<String, SimpleDateFormat>>> THREADLOCAL_FORMATS = new ThreadLocal<>();
|
||||
|
||||
/**
|
||||
* creates a {@link SimpleDateFormat} for the requested format string.
|
||||
|
@ -219,8 +218,7 @@ public final class DateUtils {
|
|||
Map<String, SimpleDateFormat> formats = ref == null ? null : ref.get();
|
||||
if (formats == null) {
|
||||
formats = new HashMap<>();
|
||||
THREADLOCAL_FORMATS.set(
|
||||
new SoftReference<>(formats));
|
||||
THREADLOCAL_FORMATS.set(new SoftReference<>(formats));
|
||||
}
|
||||
|
||||
SimpleDateFormat format = formats.get(pattern);
|
||||
|
|
Loading…
Reference in New Issue