[tor-commits] [metrics-lib/master] Delete methods that only call their super.

karsten at torproject.org karsten at torproject.org
Mon Aug 27 12:33:54 UTC 2018


commit 014917d377662c3cf3bb345a0435797e98115c1d
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Mon Aug 20 20:16:31 2018 +0200

    Delete methods that only call their super.
---
 .../org/torproject/descriptor/impl/ParseHelper.java   | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/src/main/java/org/torproject/descriptor/impl/ParseHelper.java b/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
index 1bba92e..f196b2f 100644
--- a/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
+++ b/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
@@ -154,24 +154,7 @@ public class ParseHelper {
   }
 
   private static ThreadLocal<Map<String, DateFormat>> dateFormats =
-      new ThreadLocal<Map<String, DateFormat>>() {
-
-    public Map<String, DateFormat> get() {
-      return super.get();
-    }
-
-    protected Map<String, DateFormat> initialValue() {
-      return new HashMap<>();
-    }
-
-    public void remove() {
-      super.remove();
-    }
-
-    public void set(Map<String, DateFormat> value) {
-      super.set(value);
-    }
-  };
+      ThreadLocal.withInitial(HashMap::new);
 
   static DateFormat getDateFormat(String format) {
     Map<String, DateFormat> threadDateFormats = dateFormats.get();





More information about the tor-commits mailing list