[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Put back constructors.
commit 00d9a7d552a4fd254dd8e21f46b4be8c5166c82b
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Mon Sep 4 11:00:46 2017 +0200
Put back constructors.
In dfdc2c3 we removed three constructors that looked unused, but turns
out that was not the case. Let's just put them back.
---
.../org/torproject/metrics/hidserv/ComputedNetworkFractions.java | 6 ++++++
.../org/torproject/metrics/hidserv/ExtrapolatedHidServStats.java | 6 ++++++
.../java/org/torproject/metrics/hidserv/ReportedHidServStats.java | 6 ++++++
3 files changed, 18 insertions(+)
diff --git a/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ComputedNetworkFractions.java b/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ComputedNetworkFractions.java
index 3ab90f3..54c80c8 100644
--- a/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ComputedNetworkFractions.java
+++ b/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ComputedNetworkFractions.java
@@ -119,6 +119,12 @@ public class ComputedNetworkFractions implements Document {
private static Map<String, Long> previouslyParsedDates =
Collections.synchronizedMap(new HashMap<String, Long>());
+ /** Instantiates an empty fractions object that will be initialized more
+ * by the parse method.
+ *
+ * <p>Invoked by {@link DocumentStore#retrieve} via reflection.</p> */
+ ComputedNetworkFractions() {}
+
/** Initializes this fractions object using the two provided strings
* that have been produced by the format method earlier and returns
* whether this operation was successful. */
diff --git a/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ExtrapolatedHidServStats.java b/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ExtrapolatedHidServStats.java
index d38174a..60f9ce0 100644
--- a/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ExtrapolatedHidServStats.java
+++ b/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ExtrapolatedHidServStats.java
@@ -118,6 +118,12 @@ public class ExtrapolatedHidServStats implements Document {
return new String[] { first, second };
}
+ /** Instantiates an empty stats object that will be initialized more by
+ * the parse method.
+ *
+ * <p>Invoked by {@link DocumentStore#retrieve} via reflection.</p> */
+ ExtrapolatedHidServStats() {}
+
/** Initializes this stats object using the two provided strings that
* have been produced by the format method earlier and returns whether
* this operation was successful. */
diff --git a/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ReportedHidServStats.java b/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ReportedHidServStats.java
index 6f2d548..66a81c4 100644
--- a/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ReportedHidServStats.java
+++ b/modules/hidserv/src/main/java/org/torproject/metrics/hidserv/ReportedHidServStats.java
@@ -97,6 +97,12 @@ public class ReportedHidServStats implements Document {
return new String[] { first, second };
}
+ /** Instantiate an empty stats object that will be initialized more by
+ * the parse method.
+ *
+ * <p>Invoked by {@link DocumentStore#retrieve} via reflection.</p> */
+ ReportedHidServStats() {}
+
/* Initialize this stats object using the two provided strings that have
* been produced by the format method earlier. Return whether this
* operation was successful. */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits