[tor-commits] [exonerator/master] Remove recently introduced checkstyle problems.

karsten at torproject.org karsten at torproject.org
Mon Oct 16 08:57:50 UTC 2017


commit acd4225c29d74b4348263036854871f0c2873b7b
Author: iwakeh <iwakeh at torproject.org>
Date:   Sat Sep 16 15:13:28 2017 +0000

    Remove recently introduced checkstyle problems.
---
 .../java/org/torproject/exonerator/ExoneraTorServlet.java  |  2 --
 src/main/java/org/torproject/exonerator/QueryResponse.java |  4 +---
 .../org/torproject/exonerator/ExoneraTorServletTest.java   |  3 ---
 .../java/org/torproject/exonerator/QueryResponseTest.java  | 14 ++++++++------
 4 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/src/main/java/org/torproject/exonerator/ExoneraTorServlet.java b/src/main/java/org/torproject/exonerator/ExoneraTorServlet.java
index e5dac24..1e1bc42 100644
--- a/src/main/java/org/torproject/exonerator/ExoneraTorServlet.java
+++ b/src/main/java/org/torproject/exonerator/ExoneraTorServlet.java
@@ -9,11 +9,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
diff --git a/src/main/java/org/torproject/exonerator/QueryResponse.java b/src/main/java/org/torproject/exonerator/QueryResponse.java
index b172b7d..448676d 100644
--- a/src/main/java/org/torproject/exonerator/QueryResponse.java
+++ b/src/main/java/org/torproject/exonerator/QueryResponse.java
@@ -10,9 +10,7 @@ import com.google.gson.annotations.SerializedName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
 import java.io.Reader;
-import java.util.Objects;
 
 /** Query response from the ExoneraTor database. */
 public class QueryResponse {
@@ -92,7 +90,7 @@ public class QueryResponse {
   }
 
   /** Return QueryResponse parsed from the given input stream, or
-   * <code>null</code> if something fails or an unrecognized version is found. */
+   * {@code null} if something fails or an unrecognized version is found. */
   public static QueryResponse fromJson(Reader reader) {
     Gson gson = new Gson();
     try {
diff --git a/src/test/java/org/torproject/exonerator/ExoneraTorServletTest.java b/src/test/java/org/torproject/exonerator/ExoneraTorServletTest.java
index b2e3ed4..49d9470 100644
--- a/src/test/java/org/torproject/exonerator/ExoneraTorServletTest.java
+++ b/src/test/java/org/torproject/exonerator/ExoneraTorServletTest.java
@@ -7,9 +7,6 @@ import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 
-import java.util.Arrays;
-import java.util.Collection;
-
 public class ExoneraTorServletTest {
 
   private static final String[][] ipTestData
diff --git a/src/test/java/org/torproject/exonerator/QueryResponseTest.java b/src/test/java/org/torproject/exonerator/QueryResponseTest.java
index 8c79949..634cdf5 100644
--- a/src/test/java/org/torproject/exonerator/QueryResponseTest.java
+++ b/src/test/java/org/torproject/exonerator/QueryResponseTest.java
@@ -5,7 +5,6 @@ package org.torproject.exonerator;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -29,7 +28,8 @@ public class QueryResponseTest {
           + "\"query_date\":\"2016-12-12\","
           + "\"first_date_in_database\":\"2016-01-01\","
           + "\"last_date_in_database\":\"2016-12-31\","
-          + "\"relevant_statuses\":true,\"matches\":[{\"timestamp\":\"2016-12-03\","
+          + "\"relevant_statuses\":true,"
+          + "\"matches\":[{\"timestamp\":\"2016-12-03\","
           + "\"addresses\":[\"12.13.14.15\","
           + "\"12.13.14.16\"],\"fingerprint\":\"fingerprint-not-checked\","
           + "\"nickname\":\"some name\","
@@ -56,7 +56,8 @@ public class QueryResponseTest {
           + "\"query_date\":\"2016-12-12\","
           + "\"first_date_in_database\":\"2016-01-01\","
           + "\"last_date_in_database\":\"2016-12-31\","
-          + "\"relevant_statuses\":true,\"matches\":[{\"timestamp\":\"2016-12-03\","
+          + "\"relevant_statuses\":true,"
+          + "\"matches\":[{\"timestamp\":\"2016-12-03\","
           + "\"addresses\":[\"12.13.14.15\","
           + "\"12.13.14.16\"],\"fingerprint\":\"fingerprint-not-checked\","
           + "\"nickname\":\"some name\","
@@ -80,7 +81,8 @@ public class QueryResponseTest {
           + "\"query_date\":\"2016-12-12\","
           + "\"first_date_in_database\":\"2016-01-01\","
           + "\"last_date_in_database\":\"2016-12-31\","
-          + "\"relevant_statuses\":false,\"matches\":[{\"timestamp\":\"2016-12-03\","
+          + "\"relevant_statuses\":false,"
+          + "\"matches\":[{\"timestamp\":\"2016-12-03\","
           + "\"addresses\":[\"12.13.14.15\","
           + "\"12.13.14.16\"],\"fingerprint\":\"fingerprint-not-checked\","
           + "\"nickname\":\"some name\"},{\"timestamp\":\"2012-12-03\","
@@ -105,8 +107,8 @@ public class QueryResponseTest {
     if (null == this.queryResponse) {
       assertNull(QueryResponse.fromJson(new StringReader(this.json)));
     } else {
-      assertEquals(json,
-          QueryResponse.toJson(QueryResponse.fromJson(new StringReader(this.json))));
+      assertEquals(json, QueryResponse
+          .toJson(QueryResponse.fromJson(new StringReader(this.json))));
     }
   }
 





More information about the tor-commits mailing list