hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1713455 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/DateUtils.java
Date Mon, 09 Nov 2015 15:08:20 GMT
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);



Mime
View raw message