You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2015/11/09 16:08:20 UTC

svn commit: r1713455 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/DateUtils.java

Author: olegk
Date: Mon Nov  9 15:08:20 2015
New Revision: 1713455

URL: http://svn.apache.org/viewvc?rev=1713455&view=rev
Log:
Code cleanup

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/DateUtils.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/DateUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/DateUtils.java?rev=1713455&r1=1713454&r2=1713455&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/DateUtils.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/DateUtils.java Mon Nov  9 15:08:20 2015
@@ -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);