[tor-commits] [metrics-web/master] Use diamond operator.
karsten at torproject.org
karsten at torproject.org
Mon Aug 27 12:35:18 UTC 2018
commit 429c9e01a5425ad6f39432adcea97f85d8d30813
Author: Karsten Loesing <karsten.loesing at gmx.net>
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.
More information about the tor-commits
mailing list