[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/release] Delete methods that only call their super.
commit af0900d18c1461db90a9512231e9342ad4c57a64
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Mon Aug 20 20:16:06 2018 +0200
Delete methods that only call their super.
---
.../metrics/stats/hidserv/DateTimeHelper.java | 19 +------------------
.../java/org/torproject/metrics/web/AboutServlet.java | 5 -----
.../org/torproject/metrics/web/BubblesServlet.java | 5 -----
.../torproject/metrics/web/DevelopmentServlet.java | 5 -----
.../java/org/torproject/metrics/web/ErrorServlet.java | 5 -----
.../org/torproject/metrics/web/GlossaryServlet.java | 5 -----
.../java/org/torproject/metrics/web/IndexServlet.java | 5 -----
.../java/org/torproject/metrics/web/LinkServlet.java | 5 -----
.../org/torproject/metrics/web/MetricsLibServlet.java | 5 -----
.../org/torproject/metrics/web/OnionooServlet.java | 5 -----
.../org/torproject/metrics/web/OperationServlet.java | 5 -----
.../torproject/metrics/web/RelaySearchServlet.java | 5 -----
.../metrics/web/ReproducibleMetricsServlet.java | 5 -----
.../org/torproject/metrics/web/ResearchServlet.java | 5 -----
.../org/torproject/metrics/web/ServicesServlet.java | 5 -----
.../org/torproject/metrics/web/SourcesServlet.java | 5 -----
.../java/org/torproject/metrics/web/StatsServlet.java | 5 -----
17 files changed, 1 insertion(+), 98 deletions(-)
diff --git a/src/main/java/org/torproject/metrics/stats/hidserv/DateTimeHelper.java b/src/main/java/org/torproject/metrics/stats/hidserv/DateTimeHelper.java
index 58a785e..ade7024 100644
--- a/src/main/java/org/torproject/metrics/stats/hidserv/DateTimeHelper.java
+++ b/src/main/java/org/torproject/metrics/stats/hidserv/DateTimeHelper.java
@@ -40,24 +40,7 @@ public class DateTimeHelper {
* timestamps, protected using ThreadLocal to ensure that each thread
* uses its own instances. */
private static ThreadLocal<Map<String, DateFormat>> dateFormats =
- new ThreadLocal<Map<String, DateFormat>>() {
-
- public Map<String, DateFormat> get() {
- return super.get();
- }
-
- protected Map<String, DateFormat> initialValue() {
- return new HashMap<>();
- }
-
- public void remove() {
- super.remove();
- }
-
- public void set(Map<String, DateFormat> value) {
- super.set(value);
- }
- };
+ ThreadLocal.withInitial(HashMap::new);
/** Returns an instance of DateFormat for the given format, and if no
* such instance exists, creates one and puts it in the map. */
diff --git a/src/main/java/org/torproject/metrics/web/AboutServlet.java b/src/main/java/org/torproject/metrics/web/AboutServlet.java
index 30cb606..db39120 100644
--- a/src/main/java/org/torproject/metrics/web/AboutServlet.java
+++ b/src/main/java/org/torproject/metrics/web/AboutServlet.java
@@ -14,11 +14,6 @@ public class AboutServlet extends AnyServlet {
private static final long serialVersionUID = 97168997894664L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/BubblesServlet.java b/src/main/java/org/torproject/metrics/web/BubblesServlet.java
index 8f83184..d59c0f5 100644
--- a/src/main/java/org/torproject/metrics/web/BubblesServlet.java
+++ b/src/main/java/org/torproject/metrics/web/BubblesServlet.java
@@ -16,11 +16,6 @@ public class BubblesServlet extends MetricServlet {
private static final long serialVersionUID = -6011833075497881033L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
String requestUri = request.getRequestURI();
diff --git a/src/main/java/org/torproject/metrics/web/DevelopmentServlet.java b/src/main/java/org/torproject/metrics/web/DevelopmentServlet.java
index a330ab1..540273d 100644
--- a/src/main/java/org/torproject/metrics/web/DevelopmentServlet.java
+++ b/src/main/java/org/torproject/metrics/web/DevelopmentServlet.java
@@ -14,11 +14,6 @@ public class DevelopmentServlet extends AnyServlet {
private static final long serialVersionUID = 6850919895248020945L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/ErrorServlet.java b/src/main/java/org/torproject/metrics/web/ErrorServlet.java
index f3d6974..49fbd68 100644
--- a/src/main/java/org/torproject/metrics/web/ErrorServlet.java
+++ b/src/main/java/org/torproject/metrics/web/ErrorServlet.java
@@ -14,11 +14,6 @@ public class ErrorServlet extends AnyServlet {
private static final long serialVersionUID = 6850919895248020945L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/GlossaryServlet.java b/src/main/java/org/torproject/metrics/web/GlossaryServlet.java
index 30fd3c6..7f199c1 100644
--- a/src/main/java/org/torproject/metrics/web/GlossaryServlet.java
+++ b/src/main/java/org/torproject/metrics/web/GlossaryServlet.java
@@ -14,11 +14,6 @@ public class GlossaryServlet extends AnyServlet {
private static final long serialVersionUID = -971194326457109601L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/IndexServlet.java b/src/main/java/org/torproject/metrics/web/IndexServlet.java
index ed76081..0bde0ae 100644
--- a/src/main/java/org/torproject/metrics/web/IndexServlet.java
+++ b/src/main/java/org/torproject/metrics/web/IndexServlet.java
@@ -14,11 +14,6 @@ public class IndexServlet extends AnyServlet {
private static final long serialVersionUID = -5156539049907533057L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/LinkServlet.java b/src/main/java/org/torproject/metrics/web/LinkServlet.java
index 3dcaeb1..7c5cb02 100644
--- a/src/main/java/org/torproject/metrics/web/LinkServlet.java
+++ b/src/main/java/org/torproject/metrics/web/LinkServlet.java
@@ -15,11 +15,6 @@ import javax.servlet.http.HttpServletResponse;
public class LinkServlet extends MetricServlet {
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
String requestUri = request.getRequestURI();
diff --git a/src/main/java/org/torproject/metrics/web/MetricsLibServlet.java b/src/main/java/org/torproject/metrics/web/MetricsLibServlet.java
index 4f1915e..b82ccf8 100644
--- a/src/main/java/org/torproject/metrics/web/MetricsLibServlet.java
+++ b/src/main/java/org/torproject/metrics/web/MetricsLibServlet.java
@@ -14,11 +14,6 @@ public class MetricsLibServlet extends AnyServlet {
private static final long serialVersionUID = -6009422570527820853L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/OnionooServlet.java b/src/main/java/org/torproject/metrics/web/OnionooServlet.java
index 848790e..65fbe58 100644
--- a/src/main/java/org/torproject/metrics/web/OnionooServlet.java
+++ b/src/main/java/org/torproject/metrics/web/OnionooServlet.java
@@ -14,11 +14,6 @@ public class OnionooServlet extends AnyServlet {
private static final long serialVersionUID = 3036525855022445178L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/OperationServlet.java b/src/main/java/org/torproject/metrics/web/OperationServlet.java
index 1e434f5..bc13648 100644
--- a/src/main/java/org/torproject/metrics/web/OperationServlet.java
+++ b/src/main/java/org/torproject/metrics/web/OperationServlet.java
@@ -14,11 +14,6 @@ public class OperationServlet extends AnyServlet {
private static final long serialVersionUID = 6850919895248020945L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/RelaySearchServlet.java b/src/main/java/org/torproject/metrics/web/RelaySearchServlet.java
index a9c0dcb..101b99c 100644
--- a/src/main/java/org/torproject/metrics/web/RelaySearchServlet.java
+++ b/src/main/java/org/torproject/metrics/web/RelaySearchServlet.java
@@ -14,11 +14,6 @@ public class RelaySearchServlet extends AnyServlet {
private static final long serialVersionUID = 1L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/ReproducibleMetricsServlet.java b/src/main/java/org/torproject/metrics/web/ReproducibleMetricsServlet.java
index 3299cd2..813ec6c 100644
--- a/src/main/java/org/torproject/metrics/web/ReproducibleMetricsServlet.java
+++ b/src/main/java/org/torproject/metrics/web/ReproducibleMetricsServlet.java
@@ -14,11 +14,6 @@ public class ReproducibleMetricsServlet extends AnyServlet {
private static final long serialVersionUID = 6099009779662419291L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/ResearchServlet.java b/src/main/java/org/torproject/metrics/web/ResearchServlet.java
index fbfb70d..2c3cb09 100644
--- a/src/main/java/org/torproject/metrics/web/ResearchServlet.java
+++ b/src/main/java/org/torproject/metrics/web/ResearchServlet.java
@@ -14,11 +14,6 @@ public class ResearchServlet extends AnyServlet {
private static final long serialVersionUID = 7380914323836427960L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/ServicesServlet.java b/src/main/java/org/torproject/metrics/web/ServicesServlet.java
index c9fa3ad..df4fe1e 100644
--- a/src/main/java/org/torproject/metrics/web/ServicesServlet.java
+++ b/src/main/java/org/torproject/metrics/web/ServicesServlet.java
@@ -14,11 +14,6 @@ public class ServicesServlet extends AnyServlet {
private static final long serialVersionUID = 516625494518844400L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/SourcesServlet.java b/src/main/java/org/torproject/metrics/web/SourcesServlet.java
index 03dcfc5..d1296cc 100644
--- a/src/main/java/org/torproject/metrics/web/SourcesServlet.java
+++ b/src/main/java/org/torproject/metrics/web/SourcesServlet.java
@@ -14,11 +14,6 @@ public class SourcesServlet extends AnyServlet {
private static final long serialVersionUID = 6850919895248020945L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
diff --git a/src/main/java/org/torproject/metrics/web/StatsServlet.java b/src/main/java/org/torproject/metrics/web/StatsServlet.java
index ca04a5c..79b2ebc 100644
--- a/src/main/java/org/torproject/metrics/web/StatsServlet.java
+++ b/src/main/java/org/torproject/metrics/web/StatsServlet.java
@@ -14,11 +14,6 @@ public class StatsServlet extends AnyServlet {
private static final long serialVersionUID = 6850919895248020945L;
@Override
- public void init() throws ServletException {
- super.init();
- }
-
- @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits