[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-web/master] Use diamond operator.



commit 429c9e01a5425ad6f39432adcea97f85d8d30813
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Aug 20 15:06:18 2018 +0200

    Use diamond operator.
---
 src/main/java/org/torproject/metrics/stats/hidserv/Aggregator.java    | 2 +-
 .../torproject/metrics/stats/hidserv/ComputedNetworkFractions.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/torproject/metrics/stats/hidserv/Aggregator.java b/src/main/java/org/torproject/metrics/stats/hidserv/Aggregator.java
index 5cafb1b..004bcf8 100644
--- a/src/main/java/org/torproject/metrics/stats/hidserv/Aggregator.java
+++ b/src/main/java/org/torproject/metrics/stats/hidserv/Aggregator.java
@@ -93,7 +93,7 @@ public class Aggregator {
       }
       if (extrapolated.getFractionDirOnionsSeen() > 0.0) {
         if (!extrapolatedOnions.containsKey(date)) {
-          extrapolatedOnions.put(date, new ArrayList<double[]>());
+          extrapolatedOnions.put(date, new ArrayList<>());
         }
         extrapolatedOnions.get(date).add(new double[] {
             extrapolated.getExtrapolatedDirOnionsSeen(),
diff --git a/src/main/java/org/torproject/metrics/stats/hidserv/ComputedNetworkFractions.java b/src/main/java/org/torproject/metrics/stats/hidserv/ComputedNetworkFractions.java
index 48f3679..64547cc 100644
--- a/src/main/java/org/torproject/metrics/stats/hidserv/ComputedNetworkFractions.java
+++ b/src/main/java/org/torproject/metrics/stats/hidserv/ComputedNetworkFractions.java
@@ -84,7 +84,7 @@ public class ComputedNetworkFractions implements Document {
   }
 
   private static Map<Long, String> previouslyFormattedDates =
-      Collections.synchronizedMap(new HashMap<Long, String>());
+      Collections.synchronizedMap(new HashMap<>());
 
   /** Returns a string representation of this object, consisting of two
    * strings: the first string contains fingerprint and valid-after date,
@@ -117,7 +117,7 @@ public class ComputedNetworkFractions implements Document {
   }
 
   private static Map<String, Long> previouslyParsedDates =
-      Collections.synchronizedMap(new HashMap<String, Long>());
+      Collections.synchronizedMap(new HashMap<>());
 
   /** Instantiates an empty fractions object that will be initialized more
    * by the parse method.



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits