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

[or-cvs] [metrics-web/master 1/2] They say you shouldn't override servlet constructors.



Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu, 14 Oct 2010 09:12:05 +0200
Subject: They say you shouldn't override servlet constructors.
Commit: 43a520be35d7292d2d70d78bec5efa111a8d8ba4

---
 .../torproject/ernie/web/GraphImageServlet.java    |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/org/torproject/ernie/web/GraphImageServlet.java b/src/org/torproject/ernie/web/GraphImageServlet.java
index d1d5f21..c45f57c 100644
--- a/src/org/torproject/ernie/web/GraphImageServlet.java
+++ b/src/org/torproject/ernie/web/GraphImageServlet.java
@@ -23,7 +23,7 @@ public class GraphImageServlet extends HttpServlet {
   /* Known parameters and parameter values. */
   private Map<String, String> knownParameterValues;
 
-  public GraphImageServlet()  {
+  public void init() {
     this.dateFormat = new SimpleDateFormat("yyyy-MM-dd");
     this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
 
@@ -53,9 +53,7 @@ public class GraphImageServlet extends HttpServlet {
     this.knownParameterValues.put("bundle", "all,en,zh_CN,fa");
     this.knownParameterValues.put("source", "siv,moria,torperf");
     this.knownParameterValues.put("filesize", "50kb,1mb,5mb");
-  }
 
-  public void init() {
     ServletConfig servletConfig = getServletConfig();
     String rserveHost = servletConfig.getInitParameter("rserveHost");
     String rservePort = servletConfig.getInitParameter("rservePort");
-- 
1.7.1