[tor-commits] [metrics-lib/master] Remove circular dependencies between packages.
karsten at torproject.org
karsten at torproject.org
Wed Sep 3 14:29:55 UTC 2014
commit 99d289f98ac2384393fe9d7267f81ded59df1980
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Mon Sep 1 12:25:30 2014 +0200
Remove circular dependencies between packages.
- Use properties to build impl classes in DescriptorSourceFactory.
- Move DescriptorParseException out of impl package. For extra backward
compatibility, keep a copy of that class in impl, but deprecate it.
- Tidy up the build file.
Patch by iwakeh. Implements #12868.
---
build.xml | 22 +++++--
.../descriptor/DescriptorParseException.java | 13 ++++
.../torproject/descriptor/DescriptorParser.java | 1 -
.../descriptor/DescriptorSourceFactory.java | 69 ++++++++++++++++----
.../ImplementationNotAccessibleException.java | 14 ++++
.../descriptor/impl/BandwidthHistoryImpl.java | 1 +
.../descriptor/impl/BridgeNetworkStatusImpl.java | 1 +
.../descriptor/impl/BridgePoolAssignmentImpl.java | 1 +
.../torproject/descriptor/impl/DescriptorImpl.java | 1 +
.../descriptor/impl/DescriptorParseException.java | 6 +-
.../descriptor/impl/DescriptorParserImpl.java | 1 +
.../descriptor/impl/DescriptorReaderImpl.java | 1 +
.../descriptor/impl/DirSourceEntryImpl.java | 1 +
.../impl/DirectoryKeyCertificateImpl.java | 1 +
.../descriptor/impl/DirectorySignatureImpl.java | 1 +
.../descriptor/impl/ExitListEntryImpl.java | 1 +
.../torproject/descriptor/impl/ExitListImpl.java | 1 +
.../descriptor/impl/ExtraInfoDescriptorImpl.java | 1 +
.../descriptor/impl/MicrodescriptorImpl.java | 1 +
.../descriptor/impl/NetworkStatusEntryImpl.java | 1 +
.../descriptor/impl/NetworkStatusImpl.java | 1 +
.../torproject/descriptor/impl/ParseHelper.java | 1 +
.../descriptor/impl/RelayDirectoryImpl.java | 1 +
.../impl/RelayNetworkStatusConsensusImpl.java | 1 +
.../descriptor/impl/RelayNetworkStatusImpl.java | 1 +
.../impl/RelayNetworkStatusVoteImpl.java | 1 +
.../descriptor/impl/ServerDescriptorImpl.java | 1 +
.../descriptor/impl/TorperfResultImpl.java | 1 +
.../descriptor/impl/ConsensusBuilder.java | 1 +
.../impl/ExtraInfoDescriptorImplTest.java | 1 +
.../impl/RelayNetworkStatusConsensusImplTest.java | 1 +
.../impl/RelayNetworkStatusVoteImplTest.java | 1 +
.../descriptor/impl/ServerDescriptorImplTest.java | 1 +
33 files changed, 131 insertions(+), 21 deletions(-)
diff --git a/build.xml b/build.xml
index c1200fe..35a1694 100644
--- a/build.xml
+++ b/build.xml
@@ -2,6 +2,9 @@
<property name="sources" value="src"/>
<property name="classes" value="classes"/>
<property name="tests" value="test"/>
+ <property name="jarfile" value="descriptor.jar" />
+ <property name="source-and-target-java-version" value="1.6" />
+
<path id="classpath">
<pathelement path="${classes}"/>
<fileset dir="/usr/share/java">
@@ -10,15 +13,24 @@
<include name="junit4.jar"/>
</fileset>
</path>
+
<target name="init">
<mkdir dir="${classes}"/>
</target>
+
+ <target name="clean" >
+ <delete includeEmptyDirs="true">
+ <fileset dir="${classes}" defaultexcludes="false" includes="**" />
+ </delete>
+ <delete file="${jarfile}"/>
+ </target>
+
<target name="compile"
depends="init">
<javac destdir="${classes}"
srcdir="${sources}"
- source="1.5"
- target="1.5"
+ source="${source-and-target-java-version}"
+ target="${source-and-target-java-version}"
debug="true"
deprecation="true"
optimize="false"
@@ -28,14 +40,14 @@
</javac>
</target>
<target name="jar" depends="compile">
- <jar destfile="descriptor.jar"
+ <jar destfile="${jarfile}"
basedir="${classes}"/>
</target>
<target name="test" depends="compile">
<javac destdir="${classes}"
srcdir="${tests}"
- source="1.5"
- target="1.5"
+ source="${source-and-target-java-version}"
+ target="${source-and-target-java-version}"
debug="true"
deprecation="true"
optimize="false"
diff --git a/src/org/torproject/descriptor/DescriptorParseException.java b/src/org/torproject/descriptor/DescriptorParseException.java
new file mode 100644
index 0000000..628896e
--- /dev/null
+++ b/src/org/torproject/descriptor/DescriptorParseException.java
@@ -0,0 +1,13 @@
+/* Copyright 2014 The Tor Project
+ * See LICENSE for licensing information */
+package org.torproject.descriptor;
+
+ at SuppressWarnings("deprecation")
+public class DescriptorParseException
+ extends org.torproject.descriptor.impl.DescriptorParseException {
+ private static final long serialVersionUID = 100L;
+ public DescriptorParseException(String message) {
+ super(message);
+ }
+}
+
diff --git a/src/org/torproject/descriptor/DescriptorParser.java b/src/org/torproject/descriptor/DescriptorParser.java
index 09ae593..1a4360b 100644
--- a/src/org/torproject/descriptor/DescriptorParser.java
+++ b/src/org/torproject/descriptor/DescriptorParser.java
@@ -4,7 +4,6 @@ package org.torproject.descriptor;
import java.util.List;
-import org.torproject.descriptor.impl.DescriptorParseException;
/* Parse descriptors that are already in memory instead of using the
* descriptor reader or downloader. */
diff --git a/src/org/torproject/descriptor/DescriptorSourceFactory.java b/src/org/torproject/descriptor/DescriptorSourceFactory.java
index bcd7d60..6d95649 100644
--- a/src/org/torproject/descriptor/DescriptorSourceFactory.java
+++ b/src/org/torproject/descriptor/DescriptorSourceFactory.java
@@ -2,26 +2,67 @@
* See LICENSE for licensing information */
package org.torproject.descriptor;
-import org.torproject.descriptor.impl.DescriptorDownloaderImpl;
-import org.torproject.descriptor.impl.DescriptorParserImpl;
-import org.torproject.descriptor.impl.DescriptorReaderImpl;
-
/* Create descriptor source instances. */
-public class DescriptorSourceFactory {
+public final class DescriptorSourceFactory {
+
+ /* default implementations */
+ public final static String LOADER_DEFAULT =
+ "org.torproject.descriptor.impl.DescriptorDownloaderImpl";
+ public final static String PARSER_DEFAULT =
+ "org.torproject.descriptor.impl.DescriptorParserImpl";
+ public final static String READER_DEFAULT =
+ "org.torproject.descriptor.impl.DescriptorReaderImpl";
+
+ /* property names */
+ public final static String PARSER_PROPERTY = "onionoo.parser";
+ public final static String READER_PROPERTY = "onionoo.property";
+ public final static String LOADER_PROPERTY = "onionoo.downloader";
+
+ /**
+ * Create a descriptor parser.
+ */
+ public final static DescriptorParser createDescriptorParser() {
+ return (DescriptorParser) retrieve(PARSER_PROPERTY);
+ }
- /* Create a descriptor parser. */
- public static DescriptorParser createDescriptorParser() {
- return new DescriptorParserImpl();
+ /**
+ * Create a descriptor reader.
+ */
+ public final static DescriptorReader createDescriptorReader() {
+ return (DescriptorReader) retrieve(READER_PROPERTY);
}
- /* Create a descriptor reader. */
- public static DescriptorReader createDescriptorReader() {
- return new DescriptorReaderImpl();
+ /**
+ * Create a descriptor downloader.
+ */
+ public final static DescriptorDownloader createDescriptorDownloader() {
+ return (DescriptorDownloader) retrieve(LOADER_PROPERTY);
}
- /* Create a descriptor downloader. */
- public static DescriptorDownloader createDescriptorDownloader() {
- return new DescriptorDownloaderImpl();
+ private final static <T> Object retrieve(String type) {
+ Object object;
+ String clazzName = null;
+ try {
+ if (PARSER_PROPERTY.equals(type)) {
+ clazzName = System.getProperty(type, PARSER_DEFAULT);
+ } else if (LOADER_PROPERTY.equals(type)) {
+ clazzName = System.getProperty(type, LOADER_DEFAULT);
+ } else if (READER_PROPERTY.equals(type)) {
+ clazzName = System.getProperty(type, READER_DEFAULT);
+ }
+ object = ClassLoader.getSystemClassLoader().loadClass(clazzName).
+ newInstance();
+ } catch (ClassNotFoundException ex) {
+ throw new ImplementationNotAccessibleException("Cannot load class "
+ + clazzName + "for type " + type, ex);
+ } catch (InstantiationException ex) {
+ throw new ImplementationNotAccessibleException("Cannot load class "
+ + clazzName + "for type " + type, ex);
+ } catch (IllegalAccessException ex) {
+ throw new ImplementationNotAccessibleException("Cannot load class "
+ + clazzName + "for type " + type, ex);
+ }
+ return object;
}
}
diff --git a/src/org/torproject/descriptor/ImplementationNotAccessibleException.java b/src/org/torproject/descriptor/ImplementationNotAccessibleException.java
new file mode 100644
index 0000000..3648a4b
--- /dev/null
+++ b/src/org/torproject/descriptor/ImplementationNotAccessibleException.java
@@ -0,0 +1,14 @@
+/* Copyright 2014 The Tor Project
+ * See LICENSE for licensing information */
+package org.torproject.descriptor;
+
+ at SuppressWarnings("serial")
+public class ImplementationNotAccessibleException
+ extends RuntimeException {
+
+ public ImplementationNotAccessibleException(String string,
+ Throwable ex) {
+ super(string, ex);
+ }
+}
+
diff --git a/src/org/torproject/descriptor/impl/BandwidthHistoryImpl.java b/src/org/torproject/descriptor/impl/BandwidthHistoryImpl.java
index 1ceae54..f350740 100644
--- a/src/org/torproject/descriptor/impl/BandwidthHistoryImpl.java
+++ b/src/org/torproject/descriptor/impl/BandwidthHistoryImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.SortedMap;
import java.util.TreeMap;
diff --git a/src/org/torproject/descriptor/impl/BridgeNetworkStatusImpl.java b/src/org/torproject/descriptor/impl/BridgeNetworkStatusImpl.java
index a63d52a..d0e4a42 100644
--- a/src/org/torproject/descriptor/impl/BridgeNetworkStatusImpl.java
+++ b/src/org/torproject/descriptor/impl/BridgeNetworkStatusImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
diff --git a/src/org/torproject/descriptor/impl/BridgePoolAssignmentImpl.java b/src/org/torproject/descriptor/impl/BridgePoolAssignmentImpl.java
index c959602..9340245 100644
--- a/src/org/torproject/descriptor/impl/BridgePoolAssignmentImpl.java
+++ b/src/org/torproject/descriptor/impl/BridgePoolAssignmentImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
diff --git a/src/org/torproject/descriptor/impl/DescriptorImpl.java b/src/org/torproject/descriptor/impl/DescriptorImpl.java
index c4113be..6881a09 100644
--- a/src/org/torproject/descriptor/impl/DescriptorImpl.java
+++ b/src/org/torproject/descriptor/impl/DescriptorImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/src/org/torproject/descriptor/impl/DescriptorParseException.java b/src/org/torproject/descriptor/impl/DescriptorParseException.java
index 30d3e50..928b7a5 100644
--- a/src/org/torproject/descriptor/impl/DescriptorParseException.java
+++ b/src/org/torproject/descriptor/impl/DescriptorParseException.java
@@ -2,7 +2,11 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
-public class DescriptorParseException extends Exception {
+/**
+ * @deprecated Replaced by
+ * org.torproject.descriptor.DescriptorParseException
+ */
+ at Deprecated public class DescriptorParseException extends Exception {
private static final long serialVersionUID = 100L;
protected DescriptorParseException(String message) {
super(message);
diff --git a/src/org/torproject/descriptor/impl/DescriptorParserImpl.java b/src/org/torproject/descriptor/impl/DescriptorParserImpl.java
index c1d2ae7..992afee 100644
--- a/src/org/torproject/descriptor/impl/DescriptorParserImpl.java
+++ b/src/org/torproject/descriptor/impl/DescriptorParserImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.List;
import org.torproject.descriptor.Descriptor;
diff --git a/src/org/torproject/descriptor/impl/DescriptorReaderImpl.java b/src/org/torproject/descriptor/impl/DescriptorReaderImpl.java
index d679154..0811273 100644
--- a/src/org/torproject/descriptor/impl/DescriptorReaderImpl.java
+++ b/src/org/torproject/descriptor/impl/DescriptorReaderImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
diff --git a/src/org/torproject/descriptor/impl/DirSourceEntryImpl.java b/src/org/torproject/descriptor/impl/DirSourceEntryImpl.java
index 0156790..08d910e 100644
--- a/src/org/torproject/descriptor/impl/DirSourceEntryImpl.java
+++ b/src/org/torproject/descriptor/impl/DirSourceEntryImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
diff --git a/src/org/torproject/descriptor/impl/DirectoryKeyCertificateImpl.java b/src/org/torproject/descriptor/impl/DirectoryKeyCertificateImpl.java
index 8ef1bd7..4d8a28f 100644
--- a/src/org/torproject/descriptor/impl/DirectoryKeyCertificateImpl.java
+++ b/src/org/torproject/descriptor/impl/DirectoryKeyCertificateImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/src/org/torproject/descriptor/impl/DirectorySignatureImpl.java b/src/org/torproject/descriptor/impl/DirectorySignatureImpl.java
index d8548ec..95a0d6c 100644
--- a/src/org/torproject/descriptor/impl/DirectorySignatureImpl.java
+++ b/src/org/torproject/descriptor/impl/DirectorySignatureImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
diff --git a/src/org/torproject/descriptor/impl/ExitListEntryImpl.java b/src/org/torproject/descriptor/impl/ExitListEntryImpl.java
index fc7d286..a8b435d 100644
--- a/src/org/torproject/descriptor/impl/ExitListEntryImpl.java
+++ b/src/org/torproject/descriptor/impl/ExitListEntryImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
diff --git a/src/org/torproject/descriptor/impl/ExitListImpl.java b/src/org/torproject/descriptor/impl/ExitListImpl.java
index 8683cce..5bf1366 100644
--- a/src/org/torproject/descriptor/impl/ExitListImpl.java
+++ b/src/org/torproject/descriptor/impl/ExitListImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
diff --git a/src/org/torproject/descriptor/impl/ExtraInfoDescriptorImpl.java b/src/org/torproject/descriptor/impl/ExtraInfoDescriptorImpl.java
index 836551a..5b13234 100644
--- a/src/org/torproject/descriptor/impl/ExtraInfoDescriptorImpl.java
+++ b/src/org/torproject/descriptor/impl/ExtraInfoDescriptorImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/src/org/torproject/descriptor/impl/MicrodescriptorImpl.java b/src/org/torproject/descriptor/impl/MicrodescriptorImpl.java
index 12cbdd5..3972cf7 100644
--- a/src/org/torproject/descriptor/impl/MicrodescriptorImpl.java
+++ b/src/org/torproject/descriptor/impl/MicrodescriptorImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/src/org/torproject/descriptor/impl/NetworkStatusEntryImpl.java b/src/org/torproject/descriptor/impl/NetworkStatusEntryImpl.java
index e652a98..000c448 100644
--- a/src/org/torproject/descriptor/impl/NetworkStatusEntryImpl.java
+++ b/src/org/torproject/descriptor/impl/NetworkStatusEntryImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.HashMap;
diff --git a/src/org/torproject/descriptor/impl/NetworkStatusImpl.java b/src/org/torproject/descriptor/impl/NetworkStatusImpl.java
index d57128e..10947f9 100644
--- a/src/org/torproject/descriptor/impl/NetworkStatusImpl.java
+++ b/src/org/torproject/descriptor/impl/NetworkStatusImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedMap;
diff --git a/src/org/torproject/descriptor/impl/ParseHelper.java b/src/org/torproject/descriptor/impl/ParseHelper.java
index caec1bb..9353d3c 100644
--- a/src/org/torproject/descriptor/impl/ParseHelper.java
+++ b/src/org/torproject/descriptor/impl/ParseHelper.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
diff --git a/src/org/torproject/descriptor/impl/RelayDirectoryImpl.java b/src/org/torproject/descriptor/impl/RelayDirectoryImpl.java
index 3a149a8..3a1fd47 100644
--- a/src/org/torproject/descriptor/impl/RelayDirectoryImpl.java
+++ b/src/org/torproject/descriptor/impl/RelayDirectoryImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/src/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImpl.java b/src/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImpl.java
index 3eb69b5..4f1da6b 100644
--- a/src/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImpl.java
+++ b/src/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/src/org/torproject/descriptor/impl/RelayNetworkStatusImpl.java b/src/org/torproject/descriptor/impl/RelayNetworkStatusImpl.java
index ab86327..e1204d9 100644
--- a/src/org/torproject/descriptor/impl/RelayNetworkStatusImpl.java
+++ b/src/org/torproject/descriptor/impl/RelayNetworkStatusImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/src/org/torproject/descriptor/impl/RelayNetworkStatusVoteImpl.java b/src/org/torproject/descriptor/impl/RelayNetworkStatusVoteImpl.java
index c5c867e..eb91128 100644
--- a/src/org/torproject/descriptor/impl/RelayNetworkStatusVoteImpl.java
+++ b/src/org/torproject/descriptor/impl/RelayNetworkStatusVoteImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
diff --git a/src/org/torproject/descriptor/impl/ServerDescriptorImpl.java b/src/org/torproject/descriptor/impl/ServerDescriptorImpl.java
index 6a59038..fd60236 100644
--- a/src/org/torproject/descriptor/impl/ServerDescriptorImpl.java
+++ b/src/org/torproject/descriptor/impl/ServerDescriptorImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/src/org/torproject/descriptor/impl/TorperfResultImpl.java b/src/org/torproject/descriptor/impl/TorperfResultImpl.java
index 9045498..91033ec 100644
--- a/src/org/torproject/descriptor/impl/TorperfResultImpl.java
+++ b/src/org/torproject/descriptor/impl/TorperfResultImpl.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
diff --git a/test/org/torproject/descriptor/impl/ConsensusBuilder.java b/test/org/torproject/descriptor/impl/ConsensusBuilder.java
index f35864b..928087d 100644
--- a/test/org/torproject/descriptor/impl/ConsensusBuilder.java
+++ b/test/org/torproject/descriptor/impl/ConsensusBuilder.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import java.util.ArrayList;
import java.util.List;
diff --git a/test/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java b/test/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
index 438c700..e194923 100644
--- a/test/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
+++ b/test/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
diff --git a/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java b/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
index ca7ea7f..c5ec7a3 100644
--- a/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
+++ b/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
diff --git a/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java b/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
index b3fbcfd..c301bf1 100644
--- a/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
+++ b/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
diff --git a/test/org/torproject/descriptor/impl/ServerDescriptorImplTest.java b/test/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
index 85aa761..498c866 100644
--- a/test/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
+++ b/test/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
@@ -2,6 +2,7 @@
* See LICENSE for licensing information */
package org.torproject.descriptor.impl;
+import org.torproject.descriptor.DescriptorParseException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
More information about the tor-commits
mailing list