Author: markt Date: Thu Oct 28 12:31:07 2010 New Revision: 1028276 URL: http://svn.apache.org/viewvc?rev=1028276&view=rev Log: Remove unused code
Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=1028276&r1=1028275&r2=1028276&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java Thu Oct 28 12:31:07 2010 @@ -17,9 +17,6 @@ package org.apache.tomcat.util.http.mapper; -import java.util.ArrayList; -import java.util.List; - import javax.naming.NamingException; import javax.naming.directory.DirContext; @@ -183,14 +180,6 @@ public final class Mapper { } - public String[] getHosts() { - String hostN[] = new String[hosts.length]; - for( int i = 0; i < hosts.length; i++ ) { - hostN[i] = hosts[i].name; - } - return hostN; - } - /** * Set context, used for wrapper mapping (request dispatcher). @@ -291,25 +280,6 @@ public final class Mapper { /** - * Return all contexts, in //HOST/PATH form - * - * @return The context names - */ - public String[] getContextNames() { - List<String> list = new ArrayList<String>(); - for( int i=0; i<hosts.length; i++ ) { - for( int j=0; j<hosts[i].contextList.contexts.length; j++ ) { - String cname=hosts[i].contextList.contexts[j].name; - list.add("//" + hosts[i].name + - (cname.startsWith("/") ? cname : "/")); - } - } - String res[] = new String[list.size()]; - return list.toArray(res); - } - - - /** * Add a new Wrapper to an existing Context. * * @param hostName Virtual host name this wrapper belongs to @@ -519,43 +489,6 @@ public final class Mapper { } } - public String getWrappersString( String host, String context ) { - String names[]=getWrapperNames(host, context); - StringBuilder sb=new StringBuilder(); - for( int i=0; i<names.length; i++ ) { - sb.append(names[i]).append(":"); - } - return sb.toString(); - } - - public String[] getWrapperNames( String host, String context ) { - List<String> list = new ArrayList<String>(); - if( host==null ) host=""; - if( context==null ) context=""; - for( int i=0; i<hosts.length; i++ ) { - if( ! host.equals( hosts[i].name )) - continue; - for( int j=0; j<hosts[i].contextList.contexts.length; j++ ) { - if( ! context.equals( hosts[i].contextList.contexts[j].name)) - continue; - // found the context - Context ctx=hosts[i].contextList.contexts[j]; - list.add( ctx.defaultWrapper.path); - for( int k=0; k<ctx.exactWrappers.length; k++ ) { - list.add( ctx.exactWrappers[k].path); - } - for( int k=0; k<ctx.wildcardWrappers.length; k++ ) { - list.add( ctx.wildcardWrappers[k].path + "*"); - } - for( int k=0; k<ctx.extensionWrappers.length; k++ ) { - list.add( "*." + ctx.extensionWrappers[k].path); - } - } - } - String res[]=new String[list.size()]; - return list.toArray(res); - } - /** * Add a welcome file to the given context. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org