From: markt Date: Fri, 5 Nov 2010 17:59:51 +0000 (+0000) Subject: Remove unused method X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0ec547425f4b89115210b393e6773153bcff6457;p=tomcat7.0 Remove unused method git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1031683 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/Host.java b/java/org/apache/catalina/Host.java index 0f4242a58..b2e78796a 100644 --- a/java/org/apache/catalina/Host.java +++ b/java/org/apache/catalina/Host.java @@ -167,15 +167,6 @@ public interface Host extends Container { /** - * Return the Context that would be used to process the specified - * host-relative request URI, if any; otherwise return null. - * - * @param uri Request URI to be mapped - */ - public Context map(String uri); - - - /** * Remove the specified alias name from the aliases for this Host. * * @param alias Alias name to be removed diff --git a/java/org/apache/catalina/core/StandardHost.java b/java/org/apache/catalina/core/StandardHost.java index d79890b2c..fc442e83d 100644 --- a/java/org/apache/catalina/core/StandardHost.java +++ b/java/org/apache/catalina/core/StandardHost.java @@ -643,56 +643,6 @@ public class StandardHost extends ContainerBase implements Host { /** - * Return the Context that would be used to process the specified - * host-relative request URI, if any; otherwise return null. - * - * @param uri Request URI to be mapped - */ - @Override - public Context map(String uri) { - - if (log.isDebugEnabled()) - log.debug("Mapping request URI '" + uri + "'"); - if (uri == null) - return (null); - - // Match on the longest possible context path prefix - if (log.isTraceEnabled()) - log.trace(" Trying the longest context path prefix"); - Context context = null; - String mapuri = uri; - while (true) { - context = (Context) findChild(mapuri); - if (context != null) - break; - int slash = mapuri.lastIndexOf('/'); - if (slash < 0) - break; - mapuri = mapuri.substring(0, slash); - } - - // If no Context matches, select the default Context - if (context == null) { - if (log.isTraceEnabled()) - log.trace(" Trying the default context"); - context = (Context) findChild(""); - } - - // Complain if no Context has been selected - if (context == null) { - log.error(sm.getString("standardHost.mappingError", uri)); - return (null); - } - - // Return the mapped Context (if any) - if (log.isDebugEnabled()) - log.debug(" Mapped to context '" + context.getPath() + "'"); - return (context); - - } - - - /** * Remove the specified alias name from the aliases for this Host. * * @param alias Alias name to be removed