[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionoo/master] Move DateTimeHelper to docs package.
commit 117347214679b498ad3a6c62c91ed33809333041
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Fri Aug 15 12:08:10 2014 +0200
Move DateTimeHelper to docs package.
Implements #12866 (finally).
---
.../torproject/onionoo/docs/BandwidthStatus.java | 1 -
.../onionoo/docs/ClientsGraphHistory.java | 2 -
.../torproject/onionoo/docs/ClientsHistory.java | 2 -
.../org/torproject/onionoo/docs/ClientsStatus.java | 1 -
.../torproject/onionoo/docs/DateTimeHelper.java | 93 ++++++++++++++++++++
.../torproject/onionoo/docs/DetailsDocument.java | 1 -
.../org/torproject/onionoo/docs/DetailsStatus.java | 1 -
.../org/torproject/onionoo/docs/GraphHistory.java | 2 -
.../org/torproject/onionoo/docs/NodeStatus.java | 1 -
.../torproject/onionoo/docs/SummaryDocument.java | 1 -
.../org/torproject/onionoo/docs/UptimeHistory.java | 1 -
.../org/torproject/onionoo/docs/UptimeStatus.java | 2 -
.../org/torproject/onionoo/docs/WeightsStatus.java | 1 -
.../onionoo/updater/ClientsStatusUpdater.java | 2 +-
.../onionoo/updater/NodeDetailsStatusUpdater.java | 2 +-
.../onionoo/updater/UptimeStatusUpdater.java | 2 +-
.../torproject/onionoo/util/DateTimeHelper.java | 93 --------------------
.../onionoo/writer/BandwidthDocumentWriter.java | 2 +-
.../onionoo/writer/ClientsDocumentWriter.java | 2 +-
.../onionoo/writer/DetailsDocumentWriter.java | 2 +-
.../onionoo/writer/SummaryDocumentWriter.java | 2 +-
.../onionoo/writer/UptimeDocumentWriter.java | 2 +-
.../onionoo/writer/WeightsDocumentWriter.java | 2 +-
.../torproject/onionoo/ResourceServletTest.java | 2 +-
.../onionoo/UptimeDocumentWriterTest.java | 2 +-
.../org/torproject/onionoo/UptimeStatusTest.java | 2 +-
.../onionoo/UptimeStatusUpdaterTest.java | 2 +-
27 files changed, 106 insertions(+), 122 deletions(-)
diff --git a/src/main/java/org/torproject/onionoo/docs/BandwidthStatus.java b/src/main/java/org/torproject/onionoo/docs/BandwidthStatus.java
index c01a242..3a0d6ba 100644
--- a/src/main/java/org/torproject/onionoo/docs/BandwidthStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/BandwidthStatus.java
@@ -8,7 +8,6 @@ import java.util.SortedMap;
import java.util.TreeMap;
import org.torproject.descriptor.BandwidthHistory;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.TimeFactory;
public class BandwidthStatus extends Document {
diff --git a/src/main/java/org/torproject/onionoo/docs/ClientsGraphHistory.java b/src/main/java/org/torproject/onionoo/docs/ClientsGraphHistory.java
index 00d11a0..e679078 100644
--- a/src/main/java/org/torproject/onionoo/docs/ClientsGraphHistory.java
+++ b/src/main/java/org/torproject/onionoo/docs/ClientsGraphHistory.java
@@ -6,8 +6,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.SortedMap;
-import org.torproject.onionoo.util.DateTimeHelper;
-
public class ClientsGraphHistory {
private String first;
diff --git a/src/main/java/org/torproject/onionoo/docs/ClientsHistory.java b/src/main/java/org/torproject/onionoo/docs/ClientsHistory.java
index 446dd10..35a063a 100644
--- a/src/main/java/org/torproject/onionoo/docs/ClientsHistory.java
+++ b/src/main/java/org/torproject/onionoo/docs/ClientsHistory.java
@@ -6,8 +6,6 @@ import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
-import org.torproject.onionoo.util.DateTimeHelper;
-
public class ClientsHistory implements Comparable<ClientsHistory> {
private long startMillis;
diff --git a/src/main/java/org/torproject/onionoo/docs/ClientsStatus.java b/src/main/java/org/torproject/onionoo/docs/ClientsStatus.java
index 2e7e2ee..7257faa 100644
--- a/src/main/java/org/torproject/onionoo/docs/ClientsStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/ClientsStatus.java
@@ -6,7 +6,6 @@ import java.util.Scanner;
import java.util.SortedSet;
import java.util.TreeSet;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.TimeFactory;
public class ClientsStatus extends Document {
diff --git a/src/main/java/org/torproject/onionoo/docs/DateTimeHelper.java b/src/main/java/org/torproject/onionoo/docs/DateTimeHelper.java
new file mode 100644
index 0000000..78aa78f
--- /dev/null
+++ b/src/main/java/org/torproject/onionoo/docs/DateTimeHelper.java
@@ -0,0 +1,93 @@
+/* Copyright 2014 The Tor Project
+ * See LICENSE for licensing information */
+package org.torproject.onionoo.docs;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TimeZone;
+
+public class DateTimeHelper {
+
+ private DateTimeHelper() {
+ }
+
+ public static final long ONE_SECOND = 1000L,
+ TEN_SECONDS = 10L * ONE_SECOND,
+ ONE_MINUTE = 60L * ONE_SECOND,
+ FIVE_MINUTES = 5L * ONE_MINUTE,
+ FIFTEEN_MINUTES = 15L * ONE_MINUTE,
+ FOURTY_FIVE_MINUTES = 45L * ONE_MINUTE,
+ ONE_HOUR = 60L * ONE_MINUTE,
+ FOUR_HOURS = 4L * ONE_HOUR,
+ SIX_HOURS = 6L * ONE_HOUR,
+ TWELVE_HOURS = 12L * ONE_HOUR,
+ ONE_DAY = 24L * ONE_HOUR,
+ TWO_DAYS = 2L * ONE_DAY,
+ THREE_DAYS = 3L * ONE_DAY,
+ ONE_WEEK = 7L * ONE_DAY,
+ TEN_DAYS = 10L * ONE_DAY,
+ ROUGHLY_ONE_MONTH = 31L * ONE_DAY,
+ ROUGHLY_THREE_MONTHS = 92L * ONE_DAY,
+ ROUGHLY_ONE_YEAR = 366L * ONE_DAY,
+ ROUGHLY_FIVE_YEARS = 5L * ROUGHLY_ONE_YEAR;
+
+ public static final String ISO_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
+
+ public static final String ISO_DATETIME_TAB_FORMAT =
+ "yyyy-MM-dd\tHH:mm:ss";
+
+ public static final String ISO_YEARMONTH_FORMAT = "yyyy-MM";
+
+ public static final String DATEHOUR_NOSPACE_FORMAT = "yyyy-MM-dd-HH";
+
+ 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<String, DateFormat>();
+ }
+ public void remove() {
+ super.remove();
+ }
+ public void set(Map<String, DateFormat> value) {
+ super.set(value);
+ }
+ };
+
+ private static DateFormat getDateFormat(String format) {
+ Map<String, DateFormat> threadDateFormats = dateFormats.get();
+ if (!threadDateFormats.containsKey(format)) {
+ DateFormat dateFormat = new SimpleDateFormat(format);
+ dateFormat.setLenient(false);
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ threadDateFormats.put(format, dateFormat);
+ }
+ return threadDateFormats.get(format);
+ }
+
+ public static String format(long millis, String format) {
+ return getDateFormat(format).format(millis);
+ }
+
+ public static String format(long millis) {
+ return format(millis, ISO_DATETIME_FORMAT);
+ }
+
+ public static long parse(String string, String format) {
+ try {
+ return getDateFormat(format).parse(string).getTime();
+ } catch (ParseException e) {
+ return -1L;
+ }
+ }
+
+ public static long parse(String string) {
+ return parse(string, ISO_DATETIME_FORMAT);
+ }
+}
+
diff --git a/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java b/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
index 9196153..bda9865 100644
--- a/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
+++ b/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
@@ -6,7 +6,6 @@ import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringEscapeUtils;
-import org.torproject.onionoo.util.DateTimeHelper;
public class DetailsDocument extends Document {
diff --git a/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java b/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
index 77ab269..6fe0d80 100644
--- a/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
@@ -6,7 +6,6 @@ import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringEscapeUtils;
-import org.torproject.onionoo.util.DateTimeHelper;
public class DetailsStatus extends Document {
diff --git a/src/main/java/org/torproject/onionoo/docs/GraphHistory.java b/src/main/java/org/torproject/onionoo/docs/GraphHistory.java
index 10941db..115f9f9 100644
--- a/src/main/java/org/torproject/onionoo/docs/GraphHistory.java
+++ b/src/main/java/org/torproject/onionoo/docs/GraphHistory.java
@@ -4,8 +4,6 @@ package org.torproject.onionoo.docs;
import java.util.List;
-import org.torproject.onionoo.util.DateTimeHelper;
-
public class GraphHistory {
private String first;
diff --git a/src/main/java/org/torproject/onionoo/docs/NodeStatus.java b/src/main/java/org/torproject/onionoo/docs/NodeStatus.java
index 41292fd..fa31968 100644
--- a/src/main/java/org/torproject/onionoo/docs/NodeStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/NodeStatus.java
@@ -15,7 +15,6 @@ import java.util.TreeSet;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;
-import org.torproject.onionoo.util.DateTimeHelper;
/* Store search data of a single relay that was running in the past seven
* days. */
diff --git a/src/main/java/org/torproject/onionoo/docs/SummaryDocument.java b/src/main/java/org/torproject/onionoo/docs/SummaryDocument.java
index 0c71ae2..8645950 100644
--- a/src/main/java/org/torproject/onionoo/docs/SummaryDocument.java
+++ b/src/main/java/org/torproject/onionoo/docs/SummaryDocument.java
@@ -13,7 +13,6 @@ import java.util.regex.Pattern;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;
-import org.torproject.onionoo.util.DateTimeHelper;
public class SummaryDocument extends Document {
diff --git a/src/main/java/org/torproject/onionoo/docs/UptimeHistory.java b/src/main/java/org/torproject/onionoo/docs/UptimeHistory.java
index f0a966b..d2655d5 100644
--- a/src/main/java/org/torproject/onionoo/docs/UptimeHistory.java
+++ b/src/main/java/org/torproject/onionoo/docs/UptimeHistory.java
@@ -1,6 +1,5 @@
package org.torproject.onionoo.docs;
-import org.torproject.onionoo.util.DateTimeHelper;
public class UptimeHistory
implements Comparable<UptimeHistory> {
diff --git a/src/main/java/org/torproject/onionoo/docs/UptimeStatus.java b/src/main/java/org/torproject/onionoo/docs/UptimeStatus.java
index c712172..3bc268a 100644
--- a/src/main/java/org/torproject/onionoo/docs/UptimeStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/UptimeStatus.java
@@ -6,8 +6,6 @@ import java.util.Scanner;
import java.util.SortedSet;
import java.util.TreeSet;
-import org.torproject.onionoo.util.DateTimeHelper;
-
public class UptimeStatus extends Document {
private transient boolean isDirty = false;
diff --git a/src/main/java/org/torproject/onionoo/docs/WeightsStatus.java b/src/main/java/org/torproject/onionoo/docs/WeightsStatus.java
index ccc818a..e49dfb1 100644
--- a/src/main/java/org/torproject/onionoo/docs/WeightsStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/WeightsStatus.java
@@ -7,7 +7,6 @@ import java.util.Scanner;
import java.util.SortedMap;
import java.util.TreeMap;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.TimeFactory;
public class WeightsStatus extends Document {
diff --git a/src/main/java/org/torproject/onionoo/updater/ClientsStatusUpdater.java b/src/main/java/org/torproject/onionoo/updater/ClientsStatusUpdater.java
index a8797ba..4c21032 100644
--- a/src/main/java/org/torproject/onionoo/updater/ClientsStatusUpdater.java
+++ b/src/main/java/org/torproject/onionoo/updater/ClientsStatusUpdater.java
@@ -12,9 +12,9 @@ import org.torproject.descriptor.Descriptor;
import org.torproject.descriptor.ExtraInfoDescriptor;
import org.torproject.onionoo.docs.ClientsHistory;
import org.torproject.onionoo.docs.ClientsStatus;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStore;
import org.torproject.onionoo.docs.DocumentStoreFactory;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
/*
diff --git a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
index 827c890..8d5ab0b 100644
--- a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
+++ b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
@@ -21,11 +21,11 @@ import org.torproject.descriptor.ExitListEntry;
import org.torproject.descriptor.NetworkStatusEntry;
import org.torproject.descriptor.RelayNetworkStatusConsensus;
import org.torproject.descriptor.ServerDescriptor;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DetailsStatus;
import org.torproject.onionoo.docs.DocumentStore;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.NodeStatus;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
import org.torproject.onionoo.util.TimeFactory;
diff --git a/src/main/java/org/torproject/onionoo/updater/UptimeStatusUpdater.java b/src/main/java/org/torproject/onionoo/updater/UptimeStatusUpdater.java
index 6a7a2b1..4bbdcf1 100644
--- a/src/main/java/org/torproject/onionoo/updater/UptimeStatusUpdater.java
+++ b/src/main/java/org/torproject/onionoo/updater/UptimeStatusUpdater.java
@@ -12,10 +12,10 @@ import org.torproject.descriptor.BridgeNetworkStatus;
import org.torproject.descriptor.Descriptor;
import org.torproject.descriptor.NetworkStatusEntry;
import org.torproject.descriptor.RelayNetworkStatusConsensus;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStore;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.UptimeStatus;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
public class UptimeStatusUpdater implements DescriptorListener,
diff --git a/src/main/java/org/torproject/onionoo/util/DateTimeHelper.java b/src/main/java/org/torproject/onionoo/util/DateTimeHelper.java
deleted file mode 100644
index b350b9a..0000000
--- a/src/main/java/org/torproject/onionoo/util/DateTimeHelper.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright 2014 The Tor Project
- * See LICENSE for licensing information */
-package org.torproject.onionoo.util;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TimeZone;
-
-public class DateTimeHelper {
-
- private DateTimeHelper() {
- }
-
- public static final long ONE_SECOND = 1000L,
- TEN_SECONDS = 10L * ONE_SECOND,
- ONE_MINUTE = 60L * ONE_SECOND,
- FIVE_MINUTES = 5L * ONE_MINUTE,
- FIFTEEN_MINUTES = 15L * ONE_MINUTE,
- FOURTY_FIVE_MINUTES = 45L * ONE_MINUTE,
- ONE_HOUR = 60L * ONE_MINUTE,
- FOUR_HOURS = 4L * ONE_HOUR,
- SIX_HOURS = 6L * ONE_HOUR,
- TWELVE_HOURS = 12L * ONE_HOUR,
- ONE_DAY = 24L * ONE_HOUR,
- TWO_DAYS = 2L * ONE_DAY,
- THREE_DAYS = 3L * ONE_DAY,
- ONE_WEEK = 7L * ONE_DAY,
- TEN_DAYS = 10L * ONE_DAY,
- ROUGHLY_ONE_MONTH = 31L * ONE_DAY,
- ROUGHLY_THREE_MONTHS = 92L * ONE_DAY,
- ROUGHLY_ONE_YEAR = 366L * ONE_DAY,
- ROUGHLY_FIVE_YEARS = 5L * ROUGHLY_ONE_YEAR;
-
- public static final String ISO_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
-
- public static final String ISO_DATETIME_TAB_FORMAT =
- "yyyy-MM-dd\tHH:mm:ss";
-
- public static final String ISO_YEARMONTH_FORMAT = "yyyy-MM";
-
- public static final String DATEHOUR_NOSPACE_FORMAT = "yyyy-MM-dd-HH";
-
- 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<String, DateFormat>();
- }
- public void remove() {
- super.remove();
- }
- public void set(Map<String, DateFormat> value) {
- super.set(value);
- }
- };
-
- private static DateFormat getDateFormat(String format) {
- Map<String, DateFormat> threadDateFormats = dateFormats.get();
- if (!threadDateFormats.containsKey(format)) {
- DateFormat dateFormat = new SimpleDateFormat(format);
- dateFormat.setLenient(false);
- dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
- threadDateFormats.put(format, dateFormat);
- }
- return threadDateFormats.get(format);
- }
-
- public static String format(long millis, String format) {
- return getDateFormat(format).format(millis);
- }
-
- public static String format(long millis) {
- return format(millis, ISO_DATETIME_FORMAT);
- }
-
- public static long parse(String string, String format) {
- try {
- return getDateFormat(format).parse(string).getTime();
- } catch (ParseException e) {
- return -1L;
- }
- }
-
- public static long parse(String string) {
- return parse(string, ISO_DATETIME_FORMAT);
- }
-}
-
diff --git a/src/main/java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java
index 5ce467c..f5d860c 100644
--- a/src/main/java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java
@@ -13,6 +13,7 @@ import java.util.SortedSet;
import org.torproject.onionoo.docs.BandwidthDocument;
import org.torproject.onionoo.docs.BandwidthStatus;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStore;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.GraphHistory;
@@ -20,7 +21,6 @@ import org.torproject.onionoo.updater.DescriptorSource;
import org.torproject.onionoo.updater.DescriptorSourceFactory;
import org.torproject.onionoo.updater.DescriptorType;
import org.torproject.onionoo.updater.FingerprintListener;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
import org.torproject.onionoo.util.TimeFactory;
diff --git a/src/main/java/org/torproject/onionoo/writer/ClientsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/ClientsDocumentWriter.java
index 6684db7..0541be8 100644
--- a/src/main/java/org/torproject/onionoo/writer/ClientsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/ClientsDocumentWriter.java
@@ -15,13 +15,13 @@ import org.torproject.onionoo.docs.ClientsDocument;
import org.torproject.onionoo.docs.ClientsGraphHistory;
import org.torproject.onionoo.docs.ClientsHistory;
import org.torproject.onionoo.docs.ClientsStatus;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStore;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.updater.DescriptorSource;
import org.torproject.onionoo.updater.DescriptorSourceFactory;
import org.torproject.onionoo.updater.DescriptorType;
import org.torproject.onionoo.updater.FingerprintListener;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
import org.torproject.onionoo.util.TimeFactory;
diff --git a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
index 8d69079..bd2a955 100644
--- a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
@@ -8,6 +8,7 @@ import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DetailsDocument;
import org.torproject.onionoo.docs.DetailsStatus;
import org.torproject.onionoo.docs.DocumentStore;
@@ -17,7 +18,6 @@ import org.torproject.onionoo.updater.DescriptorSource;
import org.torproject.onionoo.updater.DescriptorSourceFactory;
import org.torproject.onionoo.updater.DescriptorType;
import org.torproject.onionoo.updater.FingerprintListener;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
import org.torproject.onionoo.util.TimeFactory;
diff --git a/src/main/java/org/torproject/onionoo/writer/SummaryDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/SummaryDocumentWriter.java
index c175533..8d68dea 100644
--- a/src/main/java/org/torproject/onionoo/writer/SummaryDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/SummaryDocumentWriter.java
@@ -6,11 +6,11 @@ import java.util.ArrayList;
import java.util.List;
import java.util.SortedSet;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStore;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.NodeStatus;
import org.torproject.onionoo.docs.SummaryDocument;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
public class SummaryDocumentWriter implements DocumentWriter {
diff --git a/src/main/java/org/torproject/onionoo/writer/UptimeDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/UptimeDocumentWriter.java
index 71f4d9a..92b434a 100644
--- a/src/main/java/org/torproject/onionoo/writer/UptimeDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/UptimeDocumentWriter.java
@@ -9,6 +9,7 @@ import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStore;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.GraphHistory;
@@ -19,7 +20,6 @@ import org.torproject.onionoo.updater.DescriptorSource;
import org.torproject.onionoo.updater.DescriptorSourceFactory;
import org.torproject.onionoo.updater.DescriptorType;
import org.torproject.onionoo.updater.FingerprintListener;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
import org.torproject.onionoo.util.TimeFactory;
diff --git a/src/main/java/org/torproject/onionoo/writer/WeightsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/WeightsDocumentWriter.java
index cfb410c..9af9825 100644
--- a/src/main/java/org/torproject/onionoo/writer/WeightsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/WeightsDocumentWriter.java
@@ -11,6 +11,7 @@ import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStore;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.GraphHistory;
@@ -20,7 +21,6 @@ import org.torproject.onionoo.updater.DescriptorSource;
import org.torproject.onionoo.updater.DescriptorSourceFactory;
import org.torproject.onionoo.updater.DescriptorType;
import org.torproject.onionoo.updater.FingerprintListener;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Logger;
import org.torproject.onionoo.util.TimeFactory;
diff --git a/src/test/java/org/torproject/onionoo/ResourceServletTest.java b/src/test/java/org/torproject/onionoo/ResourceServletTest.java
index db359e8..cf46e9f 100644
--- a/src/test/java/org/torproject/onionoo/ResourceServletTest.java
+++ b/src/test/java/org/torproject/onionoo/ResourceServletTest.java
@@ -21,6 +21,7 @@ import java.util.TreeSet;
import org.junit.Before;
import org.junit.Test;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.UpdateStatus;
import org.torproject.onionoo.server.HttpServletRequestWrapper;
@@ -28,7 +29,6 @@ import org.torproject.onionoo.server.HttpServletResponseWrapper;
import org.torproject.onionoo.server.NodeIndexer;
import org.torproject.onionoo.server.NodeIndexerFactory;
import org.torproject.onionoo.server.ResourceServlet;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.Time;
import org.torproject.onionoo.util.TimeFactory;
diff --git a/src/test/java/org/torproject/onionoo/UptimeDocumentWriterTest.java b/src/test/java/org/torproject/onionoo/UptimeDocumentWriterTest.java
index c109859..bb87721 100644
--- a/src/test/java/org/torproject/onionoo/UptimeDocumentWriterTest.java
+++ b/src/test/java/org/torproject/onionoo/UptimeDocumentWriterTest.java
@@ -10,13 +10,13 @@ import java.util.List;
import org.junit.Before;
import org.junit.Test;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.GraphHistory;
import org.torproject.onionoo.docs.UptimeDocument;
import org.torproject.onionoo.docs.UptimeStatus;
import org.torproject.onionoo.updater.DescriptorSourceFactory;
import org.torproject.onionoo.updater.DescriptorType;
-import org.torproject.onionoo.util.DateTimeHelper;
import org.torproject.onionoo.util.TimeFactory;
import org.torproject.onionoo.writer.UptimeDocumentWriter;
diff --git a/src/test/java/org/torproject/onionoo/UptimeStatusTest.java b/src/test/java/org/torproject/onionoo/UptimeStatusTest.java
index f981da3..984a281 100644
--- a/src/test/java/org/torproject/onionoo/UptimeStatusTest.java
+++ b/src/test/java/org/torproject/onionoo/UptimeStatusTest.java
@@ -12,10 +12,10 @@ import java.util.TreeSet;
import org.junit.Before;
import org.junit.Test;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.UptimeHistory;
import org.torproject.onionoo.docs.UptimeStatus;
-import org.torproject.onionoo.util.DateTimeHelper;
public class UptimeStatusTest {
diff --git a/src/test/java/org/torproject/onionoo/UptimeStatusUpdaterTest.java b/src/test/java/org/torproject/onionoo/UptimeStatusUpdaterTest.java
index 3620b7c..d1cd709 100644
--- a/src/test/java/org/torproject/onionoo/UptimeStatusUpdaterTest.java
+++ b/src/test/java/org/torproject/onionoo/UptimeStatusUpdaterTest.java
@@ -6,13 +6,13 @@ import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
+import org.torproject.onionoo.docs.DateTimeHelper;
import org.torproject.onionoo.docs.DocumentStoreFactory;
import org.torproject.onionoo.docs.UptimeHistory;
import org.torproject.onionoo.docs.UptimeStatus;
import org.torproject.onionoo.updater.DescriptorSourceFactory;
import org.torproject.onionoo.updater.DescriptorType;
import org.torproject.onionoo.updater.UptimeStatusUpdater;
-import org.torproject.onionoo.util.DateTimeHelper;
public class UptimeStatusUpdaterTest {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits