tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves RequestFilterValve.java
Date Wed, 16 May 2001 17:57:29 GMT
remm        01/05/16 10:57:28

  Modified:    catalina/src/share/org/apache/catalina/connector
                        HttpRequestBase.java HttpResponseBase.java
                        RequestBase.java ResponseBase.java
               catalina/src/share/org/apache/catalina/connector/http
                        HttpProcessor.java
               catalina/src/share/org/apache/catalina/connector/http10
                        HttpProcessor.java
               catalina/src/share/org/apache/catalina/core
                        ApplicationContext.java
                        ApplicationFilterConfig.java StandardContext.java
                        StandardContextMapper.java StandardHost.java
                        StandardWrapperValve.java
               catalina/src/share/org/apache/catalina/loader Extension.java
               catalina/src/share/org/apache/catalina/realm
                        MemoryRealm.java
               catalina/src/share/org/apache/catalina/servlets
                        DefaultServlet.java InvokerServlet.java
                        SsiInvokerServlet.java WebdavServlet.java
               catalina/src/share/org/apache/catalina/util RequestUtil.java
               catalina/src/share/org/apache/catalina/util/ssi
                        SsiMediator.java
               catalina/src/share/org/apache/catalina/valves
                        RequestFilterValve.java
  Log:
  - Replace calls to indexOf("x") by indexOf('x'), and lastIndexOf("x") by lastIndexOf('x').
    Patch submitted by Martijn Koster <mak at greenhills.co.uk>
  
  Revision  Changes    Path
  1.25      +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java
  
  Index: HttpRequestBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- HttpRequestBase.java	2001/05/14 04:51:16	1.24
  +++ HttpRequestBase.java	2001/05/16 17:55:21	1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
1.24 2001/05/14 04:51:16 craigmcc Exp $
  - * $Revision: 1.24 $
  - * $Date: 2001/05/14 04:51:16 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
1.25 2001/05/16 17:55:21 remm Exp $
  + * $Revision: 1.25 $
  + * $Date: 2001/05/16 17:55:21 $
    *
    * ====================================================================
    *
  @@ -101,7 +101,7 @@
    * be implemented.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.24 $ $Date: 2001/05/14 04:51:16 $
  + * @version $Revision: 1.25 $ $Date: 2001/05/16 17:55:21 $
    */
   
   public class HttpRequestBase
  @@ -612,7 +612,7 @@
           String contentType = getContentType();
           if (contentType == null)
               contentType = "";
  -        int semicolon = contentType.indexOf(";");
  +        int semicolon = contentType.indexOf(';');
           if (semicolon >= 0)
               contentType = contentType.substring(0, semicolon).trim();
   	if ("POST".equals(getMethod()) && (getContentLength() > 0) 
  
  
  
  1.33      +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java
  
  Index: HttpResponseBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- HttpResponseBase.java	2001/05/14 04:51:16	1.32
  +++ HttpResponseBase.java	2001/05/16 17:55:25	1.33
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
1.32 2001/05/14 04:51:16 craigmcc Exp $
  - * $Revision: 1.32 $
  - * $Date: 2001/05/14 04:51:16 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
1.33 2001/05/16 17:55:25 remm Exp $
  + * $Revision: 1.33 $
  + * $Date: 2001/05/16 17:55:25 $
    *
    * ====================================================================
    *
  @@ -100,7 +100,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.32 $ $Date: 2001/05/14 04:51:16 $
  + * @version $Revision: 1.33 $ $Date: 2001/05/16 17:55:25 $
    */
   
   public class HttpResponseBase
  @@ -692,7 +692,7 @@
   
   	String path = url;
   	String query = "";
  -	int question = url.indexOf("?");
  +	int question = url.indexOf('?');
   	if (question >= 0) {
   	    path = url.substring(0, question);
   	    query = url.substring(question);
  
  
  
  1.14      +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java
  
  Index: RequestBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- RequestBase.java	2001/05/14 04:51:17	1.13
  +++ RequestBase.java	2001/05/16 17:55:28	1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java,v
1.13 2001/05/14 04:51:17 craigmcc Exp $
  - * $Revision: 1.13 $
  - * $Date: 2001/05/14 04:51:17 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java,v
1.14 2001/05/16 17:55:28 remm Exp $
  + * $Revision: 1.14 $
  + * $Date: 2001/05/16 17:55:28 $
    *
    * ====================================================================
    *
  @@ -98,7 +98,7 @@
    * the connector-specific methods need to be implemented.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.13 $ $Date: 2001/05/14 04:51:17 $
  + * @version $Revision: 1.14 $ $Date: 2001/05/16 17:55:28 $
    */
   
   public abstract class RequestBase
  @@ -567,7 +567,7 @@
       public void setContentType(String type) {
   
   	this.contentType = type;
  -	if (type.indexOf(";") >= 0)
  +	if (type.indexOf(';') >= 0)
   	    characterEncoding = RequestUtil.parseCharacterEncoding(type);
   
       }
  
  
  
  1.14      +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java
  
  Index: ResponseBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ResponseBase.java	2001/05/14 04:51:17	1.13
  +++ ResponseBase.java	2001/05/16 17:55:30	1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
1.13 2001/05/14 04:51:17 craigmcc Exp $
  - * $Revision: 1.13 $
  - * $Date: 2001/05/14 04:51:17 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
1.14 2001/05/16 17:55:30 remm Exp $
  + * $Revision: 1.14 $
  + * $Date: 2001/05/16 17:55:30 $
    *
    * ====================================================================
    *
  @@ -88,7 +88,7 @@
    * the connector-specific methods need to be implemented.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.13 $ $Date: 2001/05/14 04:51:17 $
  + * @version $Revision: 1.14 $ $Date: 2001/05/16 17:55:30 $
    */
   
   public abstract class ResponseBase
  @@ -797,7 +797,7 @@
   	    return;	// Ignore any call from an included servlet
   
   	this.contentType = type;
  -	if (type.indexOf(";") >= 0) {
  +	if (type.indexOf(';') >= 0) {
   	    encoding = RequestUtil.parseCharacterEncoding(type);
   	    if (encoding == null)
   	        encoding = "ISO-8859-1";
  
  
  
  1.25      +7 -7      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- HttpProcessor.java	2001/04/12 01:06:12	1.24
  +++ HttpProcessor.java	2001/05/16 17:55:42	1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.24 2001/04/12 01:06:12 craigmcc Exp $
  - * $Revision: 1.24 $
  - * $Date: 2001/04/12 01:06:12 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.25 2001/05/16 17:55:42 remm Exp $
  + * $Revision: 1.25 $
  + * $Date: 2001/05/16 17:55:42 $
    *
    * ====================================================================
    *
  @@ -107,7 +107,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.24 $ $Date: 2001/04/12 01:06:12 $
  + * @version $Revision: 1.25 $ $Date: 2001/05/16 17:55:42 $
    */
   
   final class HttpProcessor
  @@ -481,7 +481,7 @@
   	    // Extract the language and country for this entry
   	    String language = null;
   	    String country = null;
  -	    int dash = entry.indexOf("-");
  +	    int dash = entry.indexOf('-');
   	    if (dash < 0) {
   		language = entry;
   		country = "";
  @@ -617,7 +617,7 @@
   	    } else if (header.equals(DefaultHeaders.CONTENT_TYPE_NAME)) {
   		request.setContentType(value);
   	    } else if (header.equals(DefaultHeaders.HOST_NAME)) {
  -		int n = value.indexOf(":");
  +		int n = value.indexOf(':');
   		if (n < 0) {
                       if (proxyName != null)
                           request.setServerName(proxyName);
  @@ -741,7 +741,7 @@
   	int semicolon = uri.indexOf(match);
   	if (semicolon >= 0) {
   	    String rest = uri.substring(semicolon + match.length());
  -	    int semicolon2 = rest.indexOf(";");
  +	    int semicolon2 = rest.indexOf(';');
   	    if (semicolon2 >= 0) {
   		request.setRequestedSessionId(rest.substring(0, semicolon2));
   		rest = rest.substring(semicolon2);
  
  
  
  1.3       +9 -9      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpProcessor.java	2001/04/12 01:06:13	1.2
  +++ HttpProcessor.java	2001/05/16 17:55:49	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
1.2 2001/04/12 01:06:13 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/04/12 01:06:13 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
1.3 2001/05/16 17:55:49 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/05/16 17:55:49 $
    *
    * ====================================================================
    *
  @@ -104,7 +104,7 @@
    * the request.  When the processor is completed, it will recycle itself.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/04/12 01:06:13 $
  + * @version $Revision: 1.3 $ $Date: 2001/05/16 17:55:49 $
    */
   
   final class HttpProcessor
  @@ -388,7 +388,7 @@
   		break;
   
   	    // Parse the header name and value
  -	    int colon = line.indexOf(":");
  +	    int colon = line.indexOf(':');
   	    if (colon < 0)
   		throw new ServletException
   		    (sm.getString("httpProcessor.parseHeaders.colon"));
  @@ -451,7 +451,7 @@
                 while (le.hasMoreElements()) {
                   String language = (String)le.nextElement();
                   String country = "";
  -                int countryIndex = language.indexOf("-");
  +                int countryIndex = language.indexOf('-');
                   if (countryIndex > -1) {
                       country = language.substring(countryIndex + 1).trim();
                       language = language.substring(0, countryIndex).trim();
  @@ -494,7 +494,7 @@
   		request.setContentType(value);
   		request.addHeader(name, value);
   	    } else if (match.equals("host")) {
  -		int n = value.indexOf(":");
  +		int n = value.indexOf(':');
   		if (n < 0)
   		    request.setServerName(value);
   		else {
  @@ -568,7 +568,7 @@
   	}
   
   	// Parse any query parameters out of the request URI
  -	int question = uri.indexOf("?");
  +	int question = uri.indexOf('?');
   	if (question >= 0) {
   	    request.setQueryString(uri.substring(question + 1));
   	    if (debug >= 1)
  @@ -582,7 +582,7 @@
   	int semicolon = uri.indexOf(match);
   	if (semicolon >= 0) {
   	    String rest = uri.substring(semicolon + match.length());
  -	    int semicolon2 = rest.indexOf(";");
  +	    int semicolon2 = rest.indexOf(';');
   	    if (semicolon2 >= 0) {
   		request.setRequestedSessionId(rest.substring(0, semicolon2));
   		rest = rest.substring(semicolon2);
  
  
  
  1.26      +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
  
  Index: ApplicationContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ApplicationContext.java	2001/05/15 02:24:17	1.25
  +++ ApplicationContext.java	2001/05/16 17:55:58	1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
1.25 2001/05/15 02:24:17 craigmcc Exp $
  - * $Revision: 1.25 $
  - * $Date: 2001/05/15 02:24:17 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
1.26 2001/05/16 17:55:58 remm Exp $
  + * $Revision: 1.26 $
  + * $Date: 2001/05/16 17:55:58 $
    *
    * ====================================================================
    *
  @@ -112,7 +112,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.25 $ $Date: 2001/05/15 02:24:17 $
  + * @version $Revision: 1.26 $ $Date: 2001/05/16 17:55:58 $
    */
   
   public class ApplicationContext
  @@ -550,7 +550,7 @@
               contextPath = "";
           String relativeURI = path;
           String queryString = null;
  -        int question = path.indexOf("?");
  +        int question = path.indexOf('?');
           if (question >= 0) {
               relativeURI = path.substring(0, question);
               queryString = path.substring(question + 1);
  
  
  
  1.6       +7 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java
  
  Index: ApplicationFilterConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ApplicationFilterConfig.java	2001/03/17 00:39:28	1.5
  +++ ApplicationFilterConfig.java	2001/05/16 17:56:01	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
1.5 2001/03/17 00:39:28 craigmcc Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/03/17 00:39:28 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
1.6 2001/05/16 17:56:01 remm Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/05/16 17:56:01 $
    *
    * ====================================================================
    *
  @@ -84,7 +84,7 @@
    * is first started.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/03/17 00:39:28 $
  + * @version $Revision: 1.6 $ $Date: 2001/05/16 17:56:01 $
    */
   
   final class ApplicationFilterConfig implements FilterConfig {
  @@ -244,6 +244,9 @@
               classLoader = this.getClass().getClassLoader();
           else
               classLoader = context.getLoader().getClassLoader();
  +
  +        ClassLoader oldCtxClassLoader = 
  +            Thread.currentThread().getContextClassLoader();
   
           // Instantiate a new instance of this filter and return it
           Class clazz = classLoader.loadClass(filterClass);
  
  
  
  1.59      +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- StandardContext.java	2001/05/12 02:41:59	1.58
  +++ StandardContext.java	2001/05/16 17:56:04	1.59
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
1.58 2001/05/12 02:41:59 craigmcc Exp $
  - * $Revision: 1.58 $
  - * $Date: 2001/05/12 02:41:59 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
1.59 2001/05/16 17:56:04 remm Exp $
  + * $Revision: 1.59 $
  + * $Date: 2001/05/16 17:56:04 $
    *
    * ====================================================================
    *
  @@ -141,7 +141,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.58 $ $Date: 2001/05/12 02:41:59 $
  + * @version $Revision: 1.59 $ $Date: 2001/05/16 17:56:04 $
    */
   
   public class StandardContext
  @@ -3759,7 +3759,7 @@
           if (urlPattern == null)
               return (false);
           if (urlPattern.startsWith("*.")) {
  -            if (urlPattern.indexOf("/") < 0)
  +            if (urlPattern.indexOf('/') < 0)
                   return (true);
               else
                   return (false);
  
  
  
  1.5       +7 -7      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextMapper.java
  
  Index: StandardContextMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextMapper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StandardContextMapper.java	2001/05/11 23:20:10	1.4
  +++ StandardContextMapper.java	2001/05/16 17:56:07	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextMapper.java,v
1.4 2001/05/11 23:20:10 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/05/11 23:20:10 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextMapper.java,v
1.5 2001/05/16 17:56:07 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/05/16 17:56:07 $
    *
    * ====================================================================
    *
  @@ -85,7 +85,7 @@
    * <code>StandardContext</code>, because it relies on internal APIs.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/05/11 23:20:10 $
  + * @version $Revision: 1.5 $ $Date: 2001/05/16 17:56:07 $
    */
   
   public final class StandardContextMapper
  @@ -248,7 +248,7 @@
   			pathInfo = null;
   		    break;
   		}
  -		int slash = servletPath.lastIndexOf("/");
  +		int slash = servletPath.lastIndexOf('/');
   		if (slash < 0)
   		    break;
   		servletPath = servletPath.substring(0, slash);
  @@ -259,10 +259,10 @@
   	if (wrapper == null) {
   	    if (debug >= 2)
   		context.log("  Trying extension match");
  -	    int slash = relativeURI.lastIndexOf("/");
  +	    int slash = relativeURI.lastIndexOf('/');
   	    if (slash >= 0) {
   		String last = relativeURI.substring(slash);
  -		int period = last.lastIndexOf(".");
  +		int period = last.lastIndexOf('.');
   		if (period >= 0) {
   		    String pattern = "*" + last.substring(period);
   		    name = context.findServletMapping(pattern);
  
  
  
  1.14      +8 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StandardHost.java	2001/05/04 05:30:00	1.13
  +++ StandardHost.java	2001/05/16 17:56:09	1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
1.13 2001/05/04 05:30:00 craigmcc Exp $
  - * $Revision: 1.13 $
  - * $Date: 2001/05/04 05:30:00 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
1.14 2001/05/16 17:56:09 remm Exp $
  + * $Revision: 1.14 $
  + * $Date: 2001/05/16 17:56:09 $
    *
    * ====================================================================
    *
  @@ -100,7 +100,7 @@
    * requests directed to a particular web application.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.13 $ $Date: 2001/05/04 05:30:00 $
  + * @version $Revision: 1.14 $ $Date: 2001/05/16 17:56:09 $
    */
   
   public class StandardHost
  @@ -459,7 +459,7 @@
   	    context = (Context) findChild(uri);
   	    if (context != null)
   		break;
  -	    int slash = uri.lastIndexOf("/");
  +	    int slash = uri.lastIndexOf('/');
   	    if (slash < 0)
   		break;
   	    uri = uri.substring(0, slash);
  @@ -836,10 +836,10 @@
           String pathname = war.toString().replace('\\', '/');
           if (pathname.endsWith("!/"))
               pathname = pathname.substring(0, pathname.length() - 2);
  -        int period = pathname.lastIndexOf(".");
  +        int period = pathname.lastIndexOf('.');
           if (period >= pathname.length() - 4)
               pathname = pathname.substring(0, period);
  -        int slash = pathname.lastIndexOf("/");
  +        int slash = pathname.lastIndexOf('/');
           if (slash >= 0)
               pathname = pathname.substring(slash + 1);
           if (debug >= 1)
  @@ -876,7 +876,7 @@
               String name = jarEntry.getName();
               if (debug >= 2)
                   log("  Am processing entry " + name);
  -            int last = name.lastIndexOf("/");
  +            int last = name.lastIndexOf('/');
               if (last >= 0) {
                   File parent = new File(docBase,
                                          name.substring(0, last));
  
  
  
  1.26      +7 -7      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java
  
  Index: StandardWrapperValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- StandardWrapperValve.java	2001/04/26 03:12:51	1.25
  +++ StandardWrapperValve.java	2001/05/16 17:56:11	1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
1.25 2001/04/26 03:12:51 craigmcc Exp $
  - * $Revision: 1.25 $
  - * $Date: 2001/04/26 03:12:51 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
1.26 2001/05/16 17:56:11 remm Exp $
  + * $Revision: 1.26 $
  + * $Date: 2001/05/16 17:56:11 $
    *
    * ====================================================================
    *
  @@ -103,7 +103,7 @@
    * <code>StandardWrapper</code> container implementation.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.25 $ $Date: 2001/04/26 03:12:51 $
  + * @version $Revision: 1.26 $ $Date: 2001/05/16 17:56:11 $
    */
   
   final class StandardWrapperValve
  @@ -760,7 +760,7 @@
   	    while (true) {
   		if (testPath.equals(comparePath + "/*"))
   		    return (true);
  -		int slash = comparePath.lastIndexOf("/");
  +		int slash = comparePath.lastIndexOf('/');
   		if (slash < 0)
   		    break;
   		comparePath = comparePath.substring(0, slash);
  @@ -770,8 +770,8 @@
   
   	// Case 3 - Extension Match
   	if (testPath.startsWith("*.")) {
  -	    int slash = requestPath.lastIndexOf("/");
  -	    int period = requestPath.lastIndexOf(".");
  +	    int slash = requestPath.lastIndexOf('/');
  +	    int period = requestPath.lastIndexOf('.');
   	    if ((slash >= 0) && (period > slash))
   		return (testPath.equals("*." +
   					requestPath.substring(period + 1)));
  
  
  
  1.3       +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Extension.java
  
  Index: Extension.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Extension.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Extension.java	2001/04/02 23:43:35	1.2
  +++ Extension.java	2001/05/16 17:56:28	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Extension.java,v
1.2 2001/04/02 23:43:35 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/04/02 23:43:35 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Extension.java,v
1.3 2001/05/16 17:56:28 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/05/16 17:56:28 $
    *
    * ====================================================================
    *
  @@ -91,7 +91,7 @@
    * <code>guide/extensions/versioning.html</code>.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/04/02 23:43:35 $
  + * @version $Revision: 1.3 $ $Date: 2001/05/16 17:56:28 $
    */
   
   public final class Extension {
  @@ -406,7 +406,7 @@
   
           while (true) {
   
  -            int space = names.indexOf(" ");
  +            int space = names.indexOf(' ');
               if (space < 0)
                   break;
               String name = names.substring(0, space).trim();
  
  
  
  1.5       +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java
  
  Index: MemoryRealm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MemoryRealm.java	2001/04/11 01:46:09	1.4
  +++ MemoryRealm.java	2001/05/16 17:56:35	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java,v
1.4 2001/04/11 01:46:09 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/04/11 01:46:09 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java,v
1.5 2001/05/16 17:56:35 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/05/16 17:56:35 $
    *
    * ====================================================================
    *
  @@ -95,7 +95,7 @@
    * synchronization is performed around accesses to the principals collection.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/04/11 01:46:09 $
  + * @version $Revision: 1.5 $ $Date: 2001/05/16 17:56:35 $
    */
   
   public final class MemoryRealm
  @@ -234,7 +234,7 @@
           ArrayList list = new ArrayList();
           roles += ",";
   	while (true) {
  -	    int comma = roles.indexOf(",");
  +	    int comma = roles.indexOf(',');
   	    if (comma < 0)
   		break;
   	    String role = roles.substring(0, comma).trim();
  
  
  
  1.36      +6 -6      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- DefaultServlet.java	2001/04/06 02:45:48	1.35
  +++ DefaultServlet.java	2001/05/16 17:56:42	1.36
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
1.35 2001/04/06 02:45:48 remm Exp $
  - * $Revision: 1.35 $
  - * $Date: 2001/04/06 02:45:48 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
1.36 2001/05/16 17:56:42 remm Exp $
  + * $Revision: 1.36 $
  + * $Date: 2001/05/16 17:56:42 $
    *
    * ====================================================================
    *
  @@ -122,7 +122,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.35 $ $Date: 2001/04/06 02:45:48 $
  + * @version $Revision: 1.36 $ $Date: 2001/05/16 17:56:42 $
    */
   
   public class DefaultServlet
  @@ -711,7 +711,7 @@
           // Checking If-Match
           headerValue = request.getHeader("If-Match");
           if (headerValue != null) {
  -            if (headerValue.indexOf("*") == -1) {
  +            if (headerValue.indexOf('*') == -1) {
                   
                   commaTokenizer = new StringTokenizer(headerValue, ",");
                   boolean conditionSatisfied = false;
  @@ -1473,7 +1473,7 @@
               parentDirectory = 
                   parentDirectory.substring(0, parentDirectory.length() - 1);
           }
  -	int slash = parentDirectory.lastIndexOf("/");
  +	int slash = parentDirectory.lastIndexOf('/');
   	if (slash >= 0) {
   	    String parent = name.substring(0, slash);
   	    writer.print("<tr><td colspan=\"3\" bgcolor=\"#ffffff\">\r\n");
  
  
  
  1.5       +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java
  
  Index: InvokerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InvokerServlet.java	2001/05/14 00:02:32	1.4
  +++ InvokerServlet.java	2001/05/16 17:56:46	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
1.4 2001/05/14 00:02:32 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/05/14 00:02:32 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
1.5 2001/05/16 17:56:46 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/05/16 17:56:46 $
    *
    * ====================================================================
    *
  @@ -86,7 +86,7 @@
    * in the web application deployment descriptor.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/05/14 00:02:32 $
  + * @version $Revision: 1.5 $ $Date: 2001/05/16 17:56:46 $
    */
   
   public final class InvokerServlet
  @@ -316,7 +316,7 @@
           // Identify the outgoing servlet name or class, and outgoing path info
           String pathInfo = inPathInfo;
   	String servletClass = pathInfo.substring(1);
  -	int slash = servletClass.indexOf("/");
  +	int slash = servletClass.indexOf('/');
   	if (slash >= 0) {
   	    pathInfo = servletClass.substring(slash);
   	    servletClass = servletClass.substring(0, slash);
  
  
  
  1.6       +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java
  
  Index: SsiInvokerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SsiInvokerServlet.java	2001/04/13 21:00:37	1.5
  +++ SsiInvokerServlet.java	2001/05/16 17:56:48	1.6
  @@ -1,8 +1,8 @@
   /*
    * SsiInvokerServlet.java
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v
1.5 2001/04/13 21:00:37 amyroh Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/04/13 21:00:37 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v
1.6 2001/05/16 17:56:48 remm Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/05/16 17:56:48 $
    *
    * ====================================================================
    *
  @@ -99,7 +99,7 @@
    *
    * @author Bip Thelin
    * @author Amy Roh
  - * @version $Revision: 1.5 $, $Date: 2001/04/13 21:00:37 $
  + * @version $Revision: 1.6 $, $Date: 2001/05/16 17:56:48 $
    */
   public final class SsiInvokerServlet extends HttpServlet {
       /** Debug level for this servlet. */
  @@ -338,7 +338,7 @@
   	throws IndexOutOfBoundsException {
   
           String modString = ((cmd.toString()).trim()).toLowerCase();
  -        return modString.substring(0, modString.indexOf(" "));
  +        return modString.substring(0, modString.indexOf(' '));
       }
   
       /**
  
  
  
  1.19      +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
  
  Index: WebdavServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- WebdavServlet.java	2001/04/11 02:37:12	1.18
  +++ WebdavServlet.java	2001/05/16 17:56:50	1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
1.18 2001/04/11 02:37:12 remm Exp $
  - * $Revision: 1.18 $
  - * $Date: 2001/04/11 02:37:12 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
1.19 2001/05/16 17:56:50 remm Exp $
  + * $Revision: 1.19 $
  + * $Date: 2001/05/16 17:56:50 $
    *
    * ====================================================================
    *
  @@ -125,7 +125,7 @@
    * are handled by the DefaultServlet.
    *
    * @author Remy Maucherat
  - * @version $Revision: 1.18 $ $Date: 2001/04/11 02:37:12 $
  + * @version $Revision: 1.19 $ $Date: 2001/05/16 17:56:50 $
    */
   
   public class WebdavServlet
  @@ -1473,7 +1473,7 @@
           }
           
           if (destinationPath.startsWith(":")) {
  -            int firstSeparator = destinationPath.indexOf("/");
  +            int firstSeparator = destinationPath.indexOf('/');
               if (firstSeparator < 0) {
                   destinationPath = "/";
               } else {
  
  
  
  1.16      +8 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/RequestUtil.java
  
  Index: RequestUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/RequestUtil.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- RequestUtil.java	2001/03/30 19:33:39	1.15
  +++ RequestUtil.java	2001/05/16 17:57:06	1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/RequestUtil.java,v
1.15 2001/03/30 19:33:39 craigmcc Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/03/30 19:33:39 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/RequestUtil.java,v
1.16 2001/05/16 17:57:06 remm Exp $
  + * $Revision: 1.16 $
  + * $Date: 2001/05/16 17:57:06 $
    *
    * ====================================================================
    *
  @@ -78,7 +78,7 @@
    *
    * @author Craig R. McClanahan
    * @author Tim Tye
  - * @version $Revision: 1.15 $ $Date: 2001/03/30 19:33:39 $
  + * @version $Revision: 1.16 $ $Date: 2001/05/16 17:57:06 $
    */
   
   public final class RequestUtil {
  @@ -200,7 +200,7 @@
   	if (start < 0)
   	    return (null);
   	String encoding = contentType.substring(start + 8);
  -	int end = encoding.indexOf(";");
  +	int end = encoding.indexOf(';');
   	if (end >= 0)
   	    encoding = encoding.substring(0, end);
           encoding = encoding.trim();
  @@ -224,7 +224,7 @@
   
           ArrayList cookies = new ArrayList();
           while (header.length() > 0) {
  -            int semicolon = header.indexOf(";");
  +            int semicolon = header.indexOf(';');
               if (semicolon < 0)
                   semicolon = header.length();
               if (semicolon == 0)
  @@ -235,7 +235,7 @@
               else
                   header = "";
   	    try {
  -		int equals = token.indexOf("=");
  +		int equals = token.indexOf('=');
   		if (equals > 0) {
   		    String name = URLDecode(token.substring(0, equals).trim());
   		    String value = URLDecode(token.substring(equals+1).trim());
  @@ -422,7 +422,7 @@
        *
        * @param map Map that accumulates the resulting parameters
        * @param data Input string containing request parameters
  -     * @param urlParameters true if we're parsing parameters on the URL
  +     * @param encoding Encoding to use for converting hex
        *
        * @exception UnsupportedEncodingException if the data is malformed
        */
  
  
  
  1.5       +8 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/ssi/SsiMediator.java
  
  Index: SsiMediator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/ssi/SsiMediator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SsiMediator.java	2001/04/26 22:58:49	1.4
  +++ SsiMediator.java	2001/05/16 17:57:14	1.5
  @@ -1,8 +1,8 @@
   /*
    * SsiMediator.java
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/ssi/SsiMediator.java,v
1.4 2001/04/26 22:58:49 bip Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/04/26 22:58:49 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/ssi/SsiMediator.java,v
1.5 2001/05/16 17:57:14 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/05/16 17:57:14 $
    *
    * ====================================================================
    *
  @@ -86,7 +86,7 @@
   /**
    * @author Bip Thelin
    * @author Amy Roh
  - * @version $Revision: 1.4 $, $Date: 2001/04/26 22:58:49 $
  + * @version $Revision: 1.5 $, $Date: 2001/05/16 17:57:14 $
    *
    */
   public class SsiMediator {
  @@ -221,7 +221,7 @@
           this.origServletContext = servletContext;
           this.contextPath = req.getContextPath();
           this.path = path;
  -        this.relpath = path.substring(0, path.lastIndexOf("/")+1);
  +        this.relpath = path.substring(0, path.lastIndexOf('/')+1);
           this.isVirtualWebappRelative = isVirtualWebappRelative;
           int c=0;
           
  @@ -261,7 +261,7 @@
           serverVariables.put("SERVER_SOFTWARE",
                               nullToString(servletContext.getServerInfo()));
           serverVariables.put("DOCUMENT_NAME",
  -                            nullToString(path.substring(path.lastIndexOf("/")+1,
  +                            nullToString(path.substring(path.lastIndexOf('/')+1,
                                                           path.length())));
           serverVariables.put("DOCUMENT_URI",
                               nullToString(path));
  @@ -401,7 +401,7 @@
               if ((!path.startsWith("/")) || (path.startsWith("./"))) {
                   // handle as file in the current directory with original servletContext
                   servletContext = origServletContext;
  -            }else if (path.indexOf("/", 1)==-1) {
  +            }else if (path.indexOf('/', 1)==-1) {
                   //root context
                   servletContext = servletContext.getContext("/");
               } else if (!contextPath.equals("")) {
  @@ -413,7 +413,7 @@
                   }
               } else if (normalized != null){
                   // find which context is the right one to handle 
  -                String context = normalized.substring(0, path.indexOf("/", 1));
  +                String context = normalized.substring(0, path.indexOf('/', 1));
                   ServletContext sc = servletContext.getContext(context);
                   if (sc!=null) {
                       servletContext = sc;
  
  
  
  1.3       +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestFilterValve.java
  
  Index: RequestFilterValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestFilterValve.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RequestFilterValve.java	2001/01/23 02:53:03	1.2
  +++ RequestFilterValve.java	2001/05/16 17:57:23	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestFilterValve.java,v
1.2 2001/01/23 02:53:03 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/01/23 02:53:03 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestFilterValve.java,v
1.3 2001/05/16 17:57:23 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/05/16 17:57:23 $
    *
    * ====================================================================
    *
  @@ -112,7 +112,7 @@
    * of the filtering you wish to perform.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/01/23 02:53:03 $
  + * @version $Revision: 1.3 $ $Date: 2001/05/16 17:57:23 $
    */
   
   public abstract class RequestFilterValve
  @@ -269,7 +269,7 @@
   
   	ArrayList reList = new ArrayList();
   	while (list.length() > 0) {
  -	    int comma = list.indexOf(",");
  +	    int comma = list.indexOf(',');
   	    if (comma < 0)
   		break;
   	    String pattern = list.substring(0, comma).trim();
  
  
  

Mime
View raw message