From ecf76f3cb17050dae739553a9b32d6958e4368f0 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 30 Dec 2009 09:29:19 +0000 Subject: [PATCH] Fix some Eclipse warnings git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@894573 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/servlets/CGIServlet.java | 34 +++++++++++++---------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/java/org/apache/catalina/servlets/CGIServlet.java b/java/org/apache/catalina/servlets/CGIServlet.java index bd493cd9a..3e504e919 100644 --- a/java/org/apache/catalina/servlets/CGIServlet.java +++ b/java/org/apache/catalina/servlets/CGIServlet.java @@ -244,6 +244,8 @@ public final class CGIServlet extends HttpServlet { /* some vars below copied from Craig R. McClanahan's InvokerServlet */ + private static final long serialVersionUID = 1L; + /** the debugging detail level for this servlet. */ private int debug = 0; @@ -327,7 +329,9 @@ public final class CGIServlet extends HttpServlet { * */ protected void printServletEnvironment(ServletOutputStream out, - HttpServletRequest req, HttpServletResponse res) throws IOException { + HttpServletRequest req, + @SuppressWarnings("unused") HttpServletResponse res) + throws IOException { // Document the properties from ServletRequest out.println("

ServletRequest Properties

"); @@ -867,21 +871,21 @@ public final class CGIServlet extends HttpServlet { } if (!currentLocation.isFile()) { return new String[] { null, null, null, null }; - } else { - if (debug >= 2) { - log("findCGI: FOUND cgi at " + currentLocation); - } - path = currentLocation.getAbsolutePath(); - name = currentLocation.getName(); + } - if (".".equals(contextPath)) { - scriptname = servletPath; - } else { - scriptname = contextPath + servletPath; - } - if (!servletPath.equals(cginame)) { - scriptname = scriptname + cginame; - } + if (debug >= 2) { + log("findCGI: FOUND cgi at " + currentLocation); + } + path = currentLocation.getAbsolutePath(); + name = currentLocation.getName(); + + if (".".equals(contextPath)) { + scriptname = servletPath; + } else { + scriptname = contextPath + servletPath; + } + if (!servletPath.equals(cginame)) { + scriptname = scriptname + cginame; } if (debug >= 1) { -- 2.11.0