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

[tor-commits] [metrics-web/release] Remove unthrown exceptions.



commit 5560134c84a9113016f715a04cede6246eaeaf87
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Aug 20 14:49:55 2018 +0200

    Remove unthrown exceptions.
---
 src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java | 5 ++---
 src/main/java/org/torproject/metrics/web/GraphImageServlet.java    | 4 +---
 src/main/java/org/torproject/metrics/web/ResearchStatsServlet.java | 4 ++--
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java
index cfbdd6c..95c495e 100644
--- a/src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java
+++ b/src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java
@@ -51,13 +51,12 @@ class Parser {
   }
 
   Ipv6NetworkStatus parseRelayNetworkStatusConsensus(
-      RelayNetworkStatusConsensus consensus) throws Exception {
+      RelayNetworkStatusConsensus consensus) {
     return this.parseStatus(true, consensus.getValidAfterMillis(),
         consensus.getStatusEntries().values());
   }
 
-  Ipv6NetworkStatus parseBridgeNetworkStatus(BridgeNetworkStatus status)
-      throws Exception {
+  Ipv6NetworkStatus parseBridgeNetworkStatus(BridgeNetworkStatus status) {
     return this.parseStatus(false, status.getPublishedMillis(),
         status.getStatusEntries().values());
   }
diff --git a/src/main/java/org/torproject/metrics/web/GraphImageServlet.java b/src/main/java/org/torproject/metrics/web/GraphImageServlet.java
index 1c5a8ca..b8b2fbc 100644
--- a/src/main/java/org/torproject/metrics/web/GraphImageServlet.java
+++ b/src/main/java/org/torproject/metrics/web/GraphImageServlet.java
@@ -6,7 +6,6 @@ package org.torproject.metrics.web;
 import java.io.BufferedOutputStream;
 import java.io.IOException;
 
-import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -33,8 +32,7 @@ public class GraphImageServlet extends HttpServlet {
 
   @Override
   public void doGet(HttpServletRequest request,
-      HttpServletResponse response) throws IOException,
-      ServletException {
+      HttpServletResponse response) throws IOException {
 
     /* Find out which graph type was requested and make sure we know this
      * graph type and file type. */
diff --git a/src/main/java/org/torproject/metrics/web/ResearchStatsServlet.java b/src/main/java/org/torproject/metrics/web/ResearchStatsServlet.java
index 4d06241..e4d665c 100644
--- a/src/main/java/org/torproject/metrics/web/ResearchStatsServlet.java
+++ b/src/main/java/org/torproject/metrics/web/ResearchStatsServlet.java
@@ -55,7 +55,7 @@ public class ResearchStatsServlet extends HttpServlet {
 
   @Override
   public void doGet(HttpServletRequest request,
-      HttpServletResponse response) throws IOException, ServletException {
+      HttpServletResponse response) throws IOException {
     File statsFile = this.determineStatsFile(request);
     if (statsFile == null) {
       response.sendError(HttpServletResponse.SC_NOT_FOUND);
@@ -84,7 +84,7 @@ public class ResearchStatsServlet extends HttpServlet {
   }
 
   private void writeStatsFile(File statsFile,
-      HttpServletResponse response) throws IOException, ServletException {
+      HttpServletResponse response) throws IOException {
     response.setContentType("text/csv");
     response.setHeader("Content-Length", String.valueOf(
         statsFile.length()));



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