From: markt Date: Sat, 10 Oct 2009 18:11:51 +0000 (+0000) Subject: Fix the Eclipse warnings, add some additional comments. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a9d6af11878f3ff6468669e134c61d55b9069e1b;p=tomcat7.0 Fix the Eclipse warnings, add some additional comments. No functional change. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@823908 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/manager/HTMLManagerServlet.java b/java/org/apache/catalina/manager/HTMLManagerServlet.java index 16f239b90..6ae2533d2 100644 --- a/java/org/apache/catalina/manager/HTMLManagerServlet.java +++ b/java/org/apache/catalina/manager/HTMLManagerServlet.java @@ -76,6 +76,8 @@ import org.apache.tomcat.util.http.fileupload.FileItem; public final class HTMLManagerServlet extends ManagerServlet { + private static final long serialVersionUID = 1L; + protected static final URLEncoder URL_ENCODER; protected static final String APPLICATION_MESSAGE = "message"; protected static final String APPLICATION_ERROR = "error"; @@ -103,6 +105,8 @@ public final class HTMLManagerServlet extends ManagerServlet { throws IOException, ServletException { // Identify the request parameters that we need + // By obtaining the command from the pathInfo, per-command security can + // be configured in web.xml String command = request.getPathInfo(); String path = request.getParameter("path"); @@ -116,9 +120,11 @@ public final class HTMLManagerServlet extends ManagerServlet { String message = ""; // Process the requested command if (command == null || command.equals("/")) { + // No command == list } else if (command.equals("/deploy")) { message = deployInternal(deployConfig, deployPath, deployWar); } else if (command.equals("/list")) { + // List always displayed - nothing to do here } else if (command.equals("/reload")) { message = reload(path); } else if (command.equals("/undeploy")) { @@ -160,6 +166,8 @@ public final class HTMLManagerServlet extends ManagerServlet { throws IOException, ServletException { // Identify the request parameters that we need + // By obtaining the command from the pathInfo, per-command security can + // be configured in web.xml String command = request.getPathInfo(); if (command == null || !command.equals("/upload")) { @@ -710,13 +718,13 @@ public final class HTMLManagerServlet extends ManagerServlet { throw new IllegalArgumentException(sm.getString("managerServlet.invalidPath", RequestUtil.filter(path))); } - String displayPath = path; + String searchPath = path; if( path.equals("/") ) - path = ""; - Context context = (Context) host.findChild(path); + searchPath = ""; + Context context = (Context) host.findChild(searchPath); if (null == context) { throw new IllegalArgumentException(sm.getString("managerServlet.noContext", - RequestUtil.filter(displayPath))); + RequestUtil.filter(path))); } Session[] sessions = context.getManager().findSessions(); return sessions; @@ -726,13 +734,13 @@ public final class HTMLManagerServlet extends ManagerServlet { throw new IllegalArgumentException(sm.getString("managerServlet.invalidPath", RequestUtil.filter(path))); } - String displayPath = path; + String searchPath = path; if( path.equals("/") ) - path = ""; - Context context = (Context) host.findChild(path); + searchPath = ""; + Context context = (Context) host.findChild(searchPath); if (null == context) { throw new IllegalArgumentException(sm.getString("managerServlet.noContext", - RequestUtil.filter(displayPath))); + RequestUtil.filter(path))); } Session session = context.getManager().findSession(id); return session;