From: markt Date: Sat, 17 Oct 2009 19:28:15 +0000 (+0000) Subject: Fix Eclipse warnings X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6f45fe6f623d60e178380e5ef63b7fe9bda19112;p=tomcat7.0 Fix Eclipse warnings git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@826296 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/manager/host/HostManagerServlet.java b/java/org/apache/catalina/manager/host/HostManagerServlet.java index 75dfc3502..efb7f82d3 100644 --- a/java/org/apache/catalina/manager/host/HostManagerServlet.java +++ b/java/org/apache/catalina/manager/host/HostManagerServlet.java @@ -94,6 +94,7 @@ import org.apache.catalina.core.ContainerBase; public class HostManagerServlet extends HttpServlet implements ContainerServlet { + private static final long serialVersionUID = 1L; // ----------------------------------------------------- Instance Variables @@ -366,12 +367,14 @@ public class HostManagerServlet // Validate and create appBase File appBaseFile = null; + File file = null; if (appBase == null || appBase.length() == 0) { - appBase = name; + file = new File(name); + } else { + file = new File(appBase); } - File file = new File(appBase); if (!file.isAbsolute()) - file = new File(System.getProperty("catalina.base"), appBase); + file = new File(System.getProperty("catalina.base"), file.getPath()); try { appBaseFile = file.getCanonicalFile(); } catch (IOException e) { @@ -408,12 +411,14 @@ public class HostManagerServlet try { is.close(); } catch (IOException e) { + // Ignore } } if (os != null) { try { os.close(); } catch (IOException e) { + // Ignore } } }