[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-web/master] Fix warnings found by Eclipse.



commit e94eac878b9c38462e48c454628bc939067084b8
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Tue Mar 20 13:25:39 2012 +0100

    Fix warnings found by Eclipse.
---
 .../ernie/cron/BridgeStatsFileHandler.java         |    3 ---
 .../ernie/cron/ConsensusStatsFileHandler.java      |    6 ------
 .../ernie/cron/ExoneraTorDatabaseImporter.java     |    2 +-
 .../ernie/cron/RelayDescriptorParser.java          |   11 +++--------
 src/org/torproject/ernie/web/ConsensusServlet.java |    2 ++
 src/org/torproject/ernie/web/CsvServlet.java       |    2 ++
 .../torproject/ernie/web/DescriptorServlet.java    |    2 ++
 .../ernie/web/ErnieGeneratedFileServlet.java       |    2 ++
 .../torproject/ernie/web/ExoneraTorServlet.java    |    5 ++---
 .../ernie/web/ExtraInfoDescriptorServlet.java      |    2 ++
 src/org/torproject/ernie/web/GraphDataServlet.java |   12 ++++--------
 .../torproject/ernie/web/GraphImageServlet.java    |    2 ++
 src/org/torproject/ernie/web/GraphsServlet.java    |    3 +++
 .../ernie/web/GraphsSubpagesServlet.java           |    2 ++
 src/org/torproject/ernie/web/IndexServlet.java     |    3 +++
 .../torproject/ernie/web/NetworkStatusServlet.java |    2 ++
 src/org/torproject/ernie/web/RObjectGenerator.java |    6 ------
 .../torproject/ernie/web/RelaySearchServlet.java   |    3 ++-
 src/org/torproject/ernie/web/RelayServlet.java     |    2 ++
 .../torproject/ernie/web/ResearchDataServlet.java  |    2 ++
 .../ernie/web/ResearchFormatsServlet.java          |    3 +++
 .../ernie/web/ResearchPapersServlet.java           |    3 +++
 src/org/torproject/ernie/web/ResearchServlet.java  |    3 +++
 .../torproject/ernie/web/ResearchToolsServlet.java |    3 +++
 .../torproject/ernie/web/RouterDetailServlet.java  |    2 ++
 .../ernie/web/ServerDescriptorServlet.java         |    2 ++
 src/org/torproject/ernie/web/StatusServlet.java    |    3 +++
 .../ernie/web/TableParameterChecker.java           |    5 -----
 src/org/torproject/ernie/web/VotesServlet.java     |    2 ++
 29 files changed, 59 insertions(+), 41 deletions(-)

diff --git a/src/org/torproject/ernie/cron/BridgeStatsFileHandler.java b/src/org/torproject/ernie/cron/BridgeStatsFileHandler.java
index 2f6ac8d..26fd0e6 100644
--- a/src/org/torproject/ernie/cron/BridgeStatsFileHandler.java
+++ b/src/org/torproject/ernie/cron/BridgeStatsFileHandler.java
@@ -369,8 +369,6 @@ public class BridgeStatsFileHandler {
         String longKey = e.getKey();
         String[] parts = longKey.split(",");
         String hashedBridgeIdentity = parts[0];
-        String date = parts[1];
-        String time = parts[2];
         if (!this.hashedRelays.contains(hashedBridgeIdentity) &&
             !this.zeroTwoTwoDescriptors.contains(longKey)) {
           Map<String, String> obs = e.getValue();
@@ -400,7 +398,6 @@ public class BridgeStatsFileHandler {
       String[] parts = longKey.split(",");
       String hashedBridgeIdentity = parts[0];
       String date = parts[1];
-      String time = parts[2];
       if (!this.hashedRelays.contains(hashedBridgeIdentity) &&
           !this.zeroTwoTwoDescriptors.contains(longKey)) {
         double[] users = bridgeUsersPerDay.get(date);
diff --git a/src/org/torproject/ernie/cron/ConsensusStatsFileHandler.java b/src/org/torproject/ernie/cron/ConsensusStatsFileHandler.java
index ebc882b..019478c 100644
--- a/src/org/torproject/ernie/cron/ConsensusStatsFileHandler.java
+++ b/src/org/torproject/ernie/cron/ConsensusStatsFileHandler.java
@@ -149,10 +149,6 @@ public class ConsensusStatsFileHandler {
    */
   public void writeFiles() {
 
-    /* Did we learn anything new about average relay or bridge numbers in
-     * this run? */
-    boolean writeConsensusStats = false;
-
     /* Go through raw observations of numbers of running bridges in bridge
      * statuses, calculate averages per day, and add these averages to
      * final results. */
@@ -175,13 +171,11 @@ public class ConsensusStatsFileHandler {
               this.logger.finer("Adding new average bridge numbers: "
                   + tempDate + line);
               this.bridgesPerDay.put(tempDate, line);
-              writeConsensusStats = true;
             } else if (!line.equals(this.bridgesPerDay.get(tempDate))) {
               this.logger.finer("Replacing existing average bridge "
                   + "numbers (" + this.bridgesPerDay.get(tempDate)
                   + " with new numbers: " + line);
               this.bridgesPerDay.put(tempDate, line);
-              writeConsensusStats = true;
             }
           }
           brunning = statuses = 0;
diff --git a/src/org/torproject/ernie/cron/ExoneraTorDatabaseImporter.java b/src/org/torproject/ernie/cron/ExoneraTorDatabaseImporter.java
index 8eb5688..72a0b44 100755
--- a/src/org/torproject/ernie/cron/ExoneraTorDatabaseImporter.java
+++ b/src/org/torproject/ernie/cron/ExoneraTorDatabaseImporter.java
@@ -461,7 +461,7 @@ public class ExoneraTorDatabaseImporter {
             String exitAddress24 = Hex.encodeHexString(
                 exitAddress24Bytes);
             String scannedTime = parts[2] + " " + parts[3];
-            long scannedMillis = -1L, publishedMillis = -1L;
+            long scannedMillis = -1L;
             try {
               scannedMillis = parseFormat.parse(scannedTime).getTime();
             } catch (ParseException e) {
diff --git a/src/org/torproject/ernie/cron/RelayDescriptorParser.java b/src/org/torproject/ernie/cron/RelayDescriptorParser.java
index 2125352..0a6213a 100644
--- a/src/org/torproject/ernie/cron/RelayDescriptorParser.java
+++ b/src/org/torproject/ernie/cron/RelayDescriptorParser.java
@@ -136,7 +136,7 @@ public class RelayDescriptorParser {
         String validAfterTime = null, nickname = null,
             relayIdentity = null, serverDesc = null, version = null,
             ports = null;
-        String fingerprint = null, dirSource = null, address = null;
+        String dirSource = null, address = null;
         long validAfter = -1L, published = -1L, bandwidth = -1L,
             orPort = 0L, dirPort = 0L;
         SortedSet<String> relayFlags = null;
@@ -150,8 +150,6 @@ public class RelayDescriptorParser {
             validAfter = parseFormat.parse(validAfterTime).getTime();
           } else if (line.startsWith("dir-source ")) {
             dirSource = line.split(" ")[2];
-          } else if (line.startsWith("fingerprint ")) {
-            fingerprint = line.split(" ")[1];
           } else if (line.startsWith("r ")) {
             if (isConsensus && relayIdentity != null &&
                 this.rddi != null) {
@@ -172,7 +170,6 @@ public class RelayDescriptorParser {
                   + line + "' in descriptor. Skipping.");
               break;
             }
-            String publishedTime = parts[4] + " " + parts[5];
             nickname = parts[1];
             relayIdentity = Hex.encodeHexString(
                 Base64.decodeBase64(parts[2] + "=")).
@@ -234,9 +231,8 @@ public class RelayDescriptorParser {
           }
         }
       } else if (line.startsWith("router ")) {
-        String platformLine = null, publishedLine = null,
-            bandwidthLine = null, extraInfoDigest = null,
-            relayIdentifier = null;
+        String platformLine = null, bandwidthLine = null,
+            extraInfoDigest = null, relayIdentifier = null;
         String[] parts = line.split(" ");
         String nickname = parts[1];
         String address = parts[2];
@@ -294,7 +290,6 @@ public class RelayDescriptorParser {
         String statsEnd = null;
         long seconds = -1L;
         List<String> bandwidthHistory = new ArrayList<String>();
-        boolean skip = false;
         while ((line = br.readLine()) != null) {
           if (line.startsWith("published ")) {
             String publishedTime = line.substring("published ".length());
diff --git a/src/org/torproject/ernie/web/ConsensusServlet.java b/src/org/torproject/ernie/web/ConsensusServlet.java
index f5afc92..9ec3106 100644
--- a/src/org/torproject/ernie/web/ConsensusServlet.java
+++ b/src/org/torproject/ernie/web/ConsensusServlet.java
@@ -23,6 +23,8 @@ import javax.sql.DataSource;
 
 public class ConsensusServlet extends HttpServlet {
 
+  private static final long serialVersionUID = 3147332016303032164L;
+
   private DataSource ds;
 
   private Logger logger;
diff --git a/src/org/torproject/ernie/web/CsvServlet.java b/src/org/torproject/ernie/web/CsvServlet.java
index d896247..912ce26 100644
--- a/src/org/torproject/ernie/web/CsvServlet.java
+++ b/src/org/torproject/ernie/web/CsvServlet.java
@@ -17,6 +17,8 @@ import javax.servlet.http.HttpServletResponse;
  */
 public class CsvServlet extends HttpServlet {
 
+  private static final long serialVersionUID = 7501442926823719958L;
+
   private RObjectGenerator rObjectGenerator;
 
   /* Available CSV files. */
diff --git a/src/org/torproject/ernie/web/DescriptorServlet.java b/src/org/torproject/ernie/web/DescriptorServlet.java
index 56f8a1d..139a4fb 100644
--- a/src/org/torproject/ernie/web/DescriptorServlet.java
+++ b/src/org/torproject/ernie/web/DescriptorServlet.java
@@ -27,6 +27,8 @@ import org.apache.commons.lang.StringEscapeUtils;
 
 public class DescriptorServlet extends HttpServlet {
 
+  private static final long serialVersionUID = 7933295702958621380L;
+
   private DataSource ds;
 
   private Logger logger;
diff --git a/src/org/torproject/ernie/web/ErnieGeneratedFileServlet.java b/src/org/torproject/ernie/web/ErnieGeneratedFileServlet.java
index 33fb22e..f625f36 100644
--- a/src/org/torproject/ernie/web/ErnieGeneratedFileServlet.java
+++ b/src/org/torproject/ernie/web/ErnieGeneratedFileServlet.java
@@ -13,6 +13,8 @@ import javax.servlet.http.HttpServletResponse;
 
 public class ErnieGeneratedFileServlet extends HttpServlet {
 
+  private static final long serialVersionUID = -5230032733057814869L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException,
       ServletException {
diff --git a/src/org/torproject/ernie/web/ExoneraTorServlet.java b/src/org/torproject/ernie/web/ExoneraTorServlet.java
index 3a71d10..41725a3 100644
--- a/src/org/torproject/ernie/web/ExoneraTorServlet.java
+++ b/src/org/torproject/ernie/web/ExoneraTorServlet.java
@@ -11,9 +11,7 @@ import java.sql.SQLException;
 import java.sql.Statement;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.SortedSet;
@@ -39,6 +37,8 @@ import org.apache.commons.lang.StringEscapeUtils;
 
 public class ExoneraTorServlet extends HttpServlet {
 
+  private static final long serialVersionUID = 1370088989739567509L;
+
   private DataSource ds;
 
   private Logger logger;
@@ -580,7 +580,6 @@ public class ExoneraTorServlet extends HttpServlet {
         cs.setDate(2, new java.sql.Date(timestamp));
         ResultSet rs = cs.executeQuery();
         while (rs.next()) {
-          Map<String, String> resultEntry = new HashMap<String, String>();
           String address = rs.getString(1);
           addressesInSameNetwork.add(address);
         }
diff --git a/src/org/torproject/ernie/web/ExtraInfoDescriptorServlet.java b/src/org/torproject/ernie/web/ExtraInfoDescriptorServlet.java
index 7d48a12..bfb3432 100644
--- a/src/org/torproject/ernie/web/ExtraInfoDescriptorServlet.java
+++ b/src/org/torproject/ernie/web/ExtraInfoDescriptorServlet.java
@@ -22,6 +22,8 @@ import javax.sql.DataSource;
 
 public class ExtraInfoDescriptorServlet extends HttpServlet {
 
+  private static final long serialVersionUID = -177072581949479416L;
+
   private DataSource ds;
 
   private Logger logger;
diff --git a/src/org/torproject/ernie/web/GraphDataServlet.java b/src/org/torproject/ernie/web/GraphDataServlet.java
index 590647b..52fab5b 100644
--- a/src/org/torproject/ernie/web/GraphDataServlet.java
+++ b/src/org/torproject/ernie/web/GraphDataServlet.java
@@ -25,6 +25,8 @@ import javax.servlet.http.HttpServletResponse;
  */
 public class GraphDataServlet extends HttpServlet {
 
+  private static final long serialVersionUID = 1799558498301134024L;
+
   private RObjectGenerator rObjectGenerator;
 
   /* Available graph data files. */
@@ -197,7 +199,6 @@ public class GraphDataServlet extends HttpServlet {
         }
         String[] firstDateAndValue = datesAndValues.first().split("=");
         String firstDate = firstDateAndValue[0];
-        String firstValue = firstDateAndValue[1];
         String lastDate = datesAndValues.last().split("=")[0];
         sb.append(",\n\"" + graphName + "\":{"
             + "\"first\":\"" + firstDate + "\","
@@ -205,7 +206,8 @@ public class GraphDataServlet extends HttpServlet {
             + "\"values\":[");
         int written = 0;
         String previousDate = firstDate;
-        long previousDateMillis = dateFormat.parse(firstDate).getTime();
+        long previousDateMillis = dateFormat.parse(previousDate).
+            getTime();
         for (String dateAndValue : datesAndValues) {
           String parts[] = dateAndValue.split("=");
           String date = parts[0];
@@ -232,12 +234,6 @@ public class GraphDataServlet extends HttpServlet {
       return;
     }
 
-    /* Make sure that we have a graph to return. */
-    if (jsonString == null) {
-      response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-      return;
-    }
-
     /* Write JSON file to response. */
     response.setHeader("Access-Control-Allow-Origin", "*");
     response.setContentType("application/json");
diff --git a/src/org/torproject/ernie/web/GraphImageServlet.java b/src/org/torproject/ernie/web/GraphImageServlet.java
index 7e8e29c..41bf652 100644
--- a/src/org/torproject/ernie/web/GraphImageServlet.java
+++ b/src/org/torproject/ernie/web/GraphImageServlet.java
@@ -16,6 +16,8 @@ import javax.servlet.http.HttpServletResponse;
  */
 public class GraphImageServlet extends HttpServlet {
 
+  private static final long serialVersionUID = -7356818641689744288L;
+
   private RObjectGenerator rObjectGenerator;
 
   public void init() {
diff --git a/src/org/torproject/ernie/web/GraphsServlet.java b/src/org/torproject/ernie/web/GraphsServlet.java
index b4658d8..1d17887 100644
--- a/src/org/torproject/ernie/web/GraphsServlet.java
+++ b/src/org/torproject/ernie/web/GraphsServlet.java
@@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 public class GraphsServlet extends HttpServlet {
+
+  private static final long serialVersionUID = 7615715032362498151L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/GraphsSubpagesServlet.java b/src/org/torproject/ernie/web/GraphsSubpagesServlet.java
index 4a1056d..80ccf6c 100644
--- a/src/org/torproject/ernie/web/GraphsSubpagesServlet.java
+++ b/src/org/torproject/ernie/web/GraphsSubpagesServlet.java
@@ -18,6 +18,8 @@ import javax.servlet.http.HttpServletResponse;
 
 public class GraphsSubpagesServlet extends HttpServlet {
 
+  private static final long serialVersionUID = -5959829347747628403L;
+
   /* Available graphs subpages with corresponding JSP to which requests
    * are forwarded. */
   private Map<String, String> availableGraphsSubpages;
diff --git a/src/org/torproject/ernie/web/IndexServlet.java b/src/org/torproject/ernie/web/IndexServlet.java
index fd0f55d..a7cbba4 100644
--- a/src/org/torproject/ernie/web/IndexServlet.java
+++ b/src/org/torproject/ernie/web/IndexServlet.java
@@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 public class IndexServlet extends HttpServlet {
+
+  private static final long serialVersionUID = 7871368999788994664L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/NetworkStatusServlet.java b/src/org/torproject/ernie/web/NetworkStatusServlet.java
index 5c87b39..3e41620 100644
--- a/src/org/torproject/ernie/web/NetworkStatusServlet.java
+++ b/src/org/torproject/ernie/web/NetworkStatusServlet.java
@@ -9,6 +9,8 @@ import javax.servlet.http.HttpServletResponse;
 
 public class NetworkStatusServlet extends HttpServlet {
 
+  private static final long serialVersionUID = 1762552983543719111L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/RObjectGenerator.java b/src/org/torproject/ernie/web/RObjectGenerator.java
index e251974..e66b4b7 100644
--- a/src/org/torproject/ernie/web/RObjectGenerator.java
+++ b/src/org/torproject/ernie/web/RObjectGenerator.java
@@ -12,7 +12,6 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.logging.Logger;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
@@ -31,13 +30,8 @@ public class RObjectGenerator implements ServletContextListener {
   private String cachedGraphsDirectory;
   private long maxCacheAge;
 
-  private Logger logger;
-
   public void contextInitialized(ServletContextEvent event) {
 
-    /* Initialize logger. */
-    this.logger = Logger.getLogger(RObjectGenerator.class.toString());
-
     /* Initialize using context parameters. */
     ServletContext servletContext = event.getServletContext();
     this.rserveHost = servletContext.getInitParameter("rserveHost");
diff --git a/src/org/torproject/ernie/web/RelaySearchServlet.java b/src/org/torproject/ernie/web/RelaySearchServlet.java
index 208a8d2..61d831e 100644
--- a/src/org/torproject/ernie/web/RelaySearchServlet.java
+++ b/src/org/torproject/ernie/web/RelaySearchServlet.java
@@ -56,6 +56,8 @@ import org.apache.commons.codec.binary.Base64;
  */
 public class RelaySearchServlet extends HttpServlet {
 
+  private static final long serialVersionUID = -1772662230310611805L;
+
   private Pattern alphaNumDotDashDollarSpacePattern =
       Pattern.compile("[A-Za-z0-9\\.\\-$ ]+");
 
@@ -425,7 +427,6 @@ public class RelaySearchServlet extends HttpServlet {
           String validAfter = rs.getTimestamp(1).toString().
               substring(0, 19);
           String fingerprint = rs.getString(2);
-          String descriptor = rs.getString(3);
           if (!foundDescriptors.containsKey(validAfter)) {
             foundDescriptors.put(validAfter, new TreeSet<String>());
           }
diff --git a/src/org/torproject/ernie/web/RelayServlet.java b/src/org/torproject/ernie/web/RelayServlet.java
index bfbd523..cec8566 100644
--- a/src/org/torproject/ernie/web/RelayServlet.java
+++ b/src/org/torproject/ernie/web/RelayServlet.java
@@ -9,6 +9,8 @@ import javax.servlet.http.HttpServletResponse;
 
 public class RelayServlet extends HttpServlet {
 
+  private static final long serialVersionUID = 2375986581752040224L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/ResearchDataServlet.java b/src/org/torproject/ernie/web/ResearchDataServlet.java
index deb6b06..1e81bc1 100644
--- a/src/org/torproject/ernie/web/ResearchDataServlet.java
+++ b/src/org/torproject/ernie/web/ResearchDataServlet.java
@@ -30,6 +30,8 @@ import javax.servlet.http.HttpServletResponse;
  */
 public class ResearchDataServlet extends HttpServlet {
 
+  private static final long serialVersionUID = -5168280373350515577L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/ResearchFormatsServlet.java b/src/org/torproject/ernie/web/ResearchFormatsServlet.java
index 7ed228c..b7bf7af 100644
--- a/src/org/torproject/ernie/web/ResearchFormatsServlet.java
+++ b/src/org/torproject/ernie/web/ResearchFormatsServlet.java
@@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 public class ResearchFormatsServlet extends HttpServlet {
+
+  private static final long serialVersionUID = 5666493868675314116L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/ResearchPapersServlet.java b/src/org/torproject/ernie/web/ResearchPapersServlet.java
index 8d36225..e5ea176 100644
--- a/src/org/torproject/ernie/web/ResearchPapersServlet.java
+++ b/src/org/torproject/ernie/web/ResearchPapersServlet.java
@@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 public class ResearchPapersServlet extends HttpServlet {
+
+  private static final long serialVersionUID = -8135459207158536268L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/ResearchServlet.java b/src/org/torproject/ernie/web/ResearchServlet.java
index 8c7c0e6..9c5766a 100644
--- a/src/org/torproject/ernie/web/ResearchServlet.java
+++ b/src/org/torproject/ernie/web/ResearchServlet.java
@@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 public class ResearchServlet extends HttpServlet {
+
+  private static final long serialVersionUID = -9151727188925700665L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/ResearchToolsServlet.java b/src/org/torproject/ernie/web/ResearchToolsServlet.java
index e2f890e..c56aff1 100644
--- a/src/org/torproject/ernie/web/ResearchToolsServlet.java
+++ b/src/org/torproject/ernie/web/ResearchToolsServlet.java
@@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 public class ResearchToolsServlet extends HttpServlet {
+
+  private static final long serialVersionUID = -3344204426180358872L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/RouterDetailServlet.java b/src/org/torproject/ernie/web/RouterDetailServlet.java
index 1012beb..89b200d 100644
--- a/src/org/torproject/ernie/web/RouterDetailServlet.java
+++ b/src/org/torproject/ernie/web/RouterDetailServlet.java
@@ -9,6 +9,8 @@ import javax.servlet.http.HttpServletResponse;
 
 public class RouterDetailServlet extends HttpServlet {
 
+  private static final long serialVersionUID = -5740769933146059947L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/ServerDescriptorServlet.java b/src/org/torproject/ernie/web/ServerDescriptorServlet.java
index 8f549f8..7723362 100644
--- a/src/org/torproject/ernie/web/ServerDescriptorServlet.java
+++ b/src/org/torproject/ernie/web/ServerDescriptorServlet.java
@@ -27,6 +27,8 @@ import javax.sql.DataSource;
 
 public class ServerDescriptorServlet extends HttpServlet {
 
+  private static final long serialVersionUID = -7935883442750583462L;
+
   private DataSource ds;
 
   private Logger logger;
diff --git a/src/org/torproject/ernie/web/StatusServlet.java b/src/org/torproject/ernie/web/StatusServlet.java
index 2418419..265edb5 100644
--- a/src/org/torproject/ernie/web/StatusServlet.java
+++ b/src/org/torproject/ernie/web/StatusServlet.java
@@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 public class StatusServlet extends HttpServlet {
+
+  private static final long serialVersionUID = -7249872082399236981L;
+
   public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
 
diff --git a/src/org/torproject/ernie/web/TableParameterChecker.java b/src/org/torproject/ernie/web/TableParameterChecker.java
index 338b3f0..ae93b41 100644
--- a/src/org/torproject/ernie/web/TableParameterChecker.java
+++ b/src/org/torproject/ernie/web/TableParameterChecker.java
@@ -33,9 +33,6 @@ public class TableParameterChecker {
   /* Available tables with corresponding parameter lists. */
   private Map<String, String> availableTables;
 
-  /* Known parameters and parameter values. */
-  private Map<String, String> knownParameterValues;
-
   /**
    * Initializes map with valid parameters for each of the graphs.
    */
@@ -46,8 +43,6 @@ public class TableParameterChecker {
     this.availableTables = new HashMap<String, String>();
     this.availableTables.put("direct-users", "start,end,filename");
     this.availableTables.put("censorship-events", "start,end,filename");
-
-    this.knownParameterValues = new HashMap<String, String>();
   }
 
   /**
diff --git a/src/org/torproject/ernie/web/VotesServlet.java b/src/org/torproject/ernie/web/VotesServlet.java
index 13fd455..d7b6ee8 100644
--- a/src/org/torproject/ernie/web/VotesServlet.java
+++ b/src/org/torproject/ernie/web/VotesServlet.java
@@ -25,6 +25,8 @@ import javax.sql.DataSource;
 
 public class VotesServlet extends HttpServlet {
 
+  private static final long serialVersionUID = 246279501605993024L;
+
   private DataSource ds;
 
   private Logger logger;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits