[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [collector/release] Remove some more unthrown exceptions.
commit bb8c53a64dc6ac774f6ba24b8d75dc66ccbd844c
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Mon Aug 20 20:30:30 2018 +0200
Remove some more unthrown exceptions.
---
.../metrics/collector/bridgedescs/BridgeSnapshotReader.java | 5 +----
.../metrics/collector/bridgedescs/BridgeDescriptorParserTest.java | 6 +++---
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/torproject/metrics/collector/bridgedescs/BridgeSnapshotReader.java b/src/main/java/org/torproject/metrics/collector/bridgedescs/BridgeSnapshotReader.java
index abd30ab..fccee5e 100644
--- a/src/main/java/org/torproject/metrics/collector/bridgedescs/BridgeSnapshotReader.java
+++ b/src/main/java/org/torproject/metrics/collector/bridgedescs/BridgeSnapshotReader.java
@@ -3,8 +3,6 @@
package org.torproject.metrics.collector.bridgedescs;
-import org.torproject.metrics.collector.conf.ConfigurationException;
-
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
@@ -38,8 +36,7 @@ public class BridgeSnapshotReader {
* Reads the half-hourly snapshots of bridge descriptors from Bifroest.
*/
public BridgeSnapshotReader(BridgeDescriptorParser bdp,
- File bridgeDirectoriesDir, File statsDirectory)
- throws ConfigurationException {
+ File bridgeDirectoriesDir, File statsDirectory) {
if (bdp == null || bridgeDirectoriesDir == null
|| statsDirectory == null) {
diff --git a/src/test/java/org/torproject/metrics/collector/bridgedescs/BridgeDescriptorParserTest.java b/src/test/java/org/torproject/metrics/collector/bridgedescs/BridgeDescriptorParserTest.java
index 43fad5e..4ea2e97 100644
--- a/src/test/java/org/torproject/metrics/collector/bridgedescs/BridgeDescriptorParserTest.java
+++ b/src/test/java/org/torproject/metrics/collector/bridgedescs/BridgeDescriptorParserTest.java
@@ -15,7 +15,7 @@ public class BridgeDescriptorParserTest {
}
@Test(expected = NullPointerException.class)
- public void testNullData() throws Exception {
+ public void testNullData() {
BridgeDescriptorParser bdp = new BridgeDescriptorParser(
new SanitizedBridgesWriter(new Configuration()));
bdp.parse(null, "", "");
@@ -24,7 +24,7 @@ public class BridgeDescriptorParserTest {
@Test
/* Empty data is not passed down to the sanitized writer.
* This test passes when there is no exception. */
- public void testDataEmpty() throws Exception {
+ public void testDataEmpty() {
BridgeDescriptorParser bdp = new BridgeDescriptorParser(
new SanitizedBridgesWriter(new Configuration()));
bdp.parse(new byte[]{}, null, null);
@@ -34,7 +34,7 @@ public class BridgeDescriptorParserTest {
/* The SanitizedBridgesWriter wasn't initialized sufficiently.
* Actually that should be corrected in SanitizedBridgesWriter
* at some point, but that's a bigger rewrite. */
- public void testMinimalData() throws Exception {
+ public void testMinimalData() {
BridgeDescriptorParser bdp = new BridgeDescriptorParser(
new SanitizedBridgesWriter(new Configuration()));
bdp.parse(new byte[]{0}, "2010-10-10 10:10:10", null);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits