Author: markt
Date: Mon Oct  4 14:18:14 2010
New Revision: 1004246

URL: http://svn.apache.org/viewvc?rev=1004246&view=rev
Log:
Remove duplicate method. Rename remaining method.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1004246&r1=1004245&r2=1004246&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Mon Oct  4 
14:18:14 2010
@@ -451,23 +451,9 @@ public class HostConfig
     }
 
     /**
-     * Given a context path, get the config file name.
+     * Given a context path, get the base name for WARs, directories etc.
      */
-    protected String getConfigFile(String path) {
-        String basename = null;
-        if (path.equals("")) {
-            basename = "ROOT";
-        } else {
-            basename = path.substring(1).replace('/', '#');
-        }
-        return (basename);
-    }
-
-    
-    /**
-     * Given a context path, get the docBase.
-     */
-    protected String getDocBase(String path) {
+    protected String getBaseName(String path) {
         String basename = null;
         if (path.equals("")) {
             basename = "ROOT";
@@ -504,21 +490,20 @@ public class HostConfig
 
         File appBase = appBase();
         File configBase = configBase();
-        String baseName = getConfigFile(name);
-        String docBase = getDocBase(name);
+        String baseName = getBaseName(name);
         
         // Deploy XML descriptors from configBase
         File xml = new File(configBase, baseName + ".xml");
         if (xml.exists())
             deployDescriptor(name, xml, baseName + ".xml");
         // Deploy WARs, and loop if additional descriptors are found
-        File war = new File(appBase, docBase + ".war");
+        File war = new File(appBase, baseName + ".war");
         if (war.exists())
-            deployWAR(name, war, docBase + ".war");
+            deployWAR(name, war, baseName + ".war");
         // Deploy expanded folders
-        File dir = new File(appBase, docBase);
+        File dir = new File(appBase, baseName);
         if (dir.exists())
-            deployDirectory(name, dir, docBase);
+            deployDirectory(name, dir, baseName);
         
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to