juergen     01/02/13 07:43:00

  Modified:    src/webdav/server/org/apache/slide/webdav/common
                        RequestUtil.java
  Log:
  CodeGuide (Jikes) is complaining without the cast to character. The cast should be 
no problem for the comparing characters are located in the lower ASCII table.
  
  Revision  Changes    Path
  1.2       +22 -21    
jakarta-slide/src/webdav/server/org/apache/slide/webdav/common/RequestUtil.java
  
  Index: RequestUtil.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/common/RequestUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestUtil.java  2001/02/11 20:39:24     1.1
  +++ RequestUtil.java  2001/02/13 15:42:59     1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/common/RequestUtil.java,v
 1.1 2001/02/11 20:39:24 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/02/11 20:39:24 $
  + * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/common/RequestUtil.java,v
 1.2 2001/02/13 15:42:59 juergen Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/02/13 15:42:59 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -23,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
    * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact [EMAIL PROTECTED]
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -59,7 +59,7 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */ 
  + */
   
   
   package org.apache.slide.webdav.common;
  @@ -78,7 +78,7 @@
    *
    * @author Craig R. McClanahan
    * @author Tim Tye
  - * @version $Revision: 1.1 $ $Date: 2001/02/11 20:39:24 $
  + * @version $Revision: 1.2 $ $Date: 2001/02/13 15:42:59 $
    */
   
   public final class RequestUtil {
  @@ -166,7 +166,7 @@
        if (end >= 0)
            encoding = encoding.substring(0, end);
           encoding = encoding.trim();
  -        if ((encoding.length() > 2) && (encoding.startsWith("\"")) 
  +        if ((encoding.length() > 2) && (encoding.startsWith("\""))
               && (encoding.endsWith("\"")))
               encoding = encoding.substring(1, encoding.length() - 1);
        return (encoding.trim());
  @@ -230,7 +230,7 @@
        *
        * @exception IllegalArgumentException if the data is malformed
        */
  -    public static void parseParameters(Map map, String data, String encoding) 
  +    public static void parseParameters(Map map, String data, String encoding)
           throws UnsupportedEncodingException {
           
           if ((data != null) && (data.length() > 0)) {
  @@ -245,7 +245,7 @@
   
       /**
        * Decode and return the specified URL-encoded String.
  -     * When the byte array is converted to a string, the system default 
  +     * When the byte array is converted to a string, the system default
        * character encoding is used...  This may be different than some other
        * servers.
        *
  @@ -263,7 +263,7 @@
   
       /**
        * Decode and return the specified URL-encoded String.
  -     * 
  +     *
        * @param str The url-encoded string
        * @param enc The encoding to use; if null, the default encoding is used
        * @exception IllegalArgumentException if a '%' character is not followed
  @@ -285,7 +285,7 @@
   
       /**
        * Decode and return the specified URL-encoded byte array.
  -     * 
  +     *
        * @param bytes The url-encoded byte array
        * @exception IllegalArgumentException if a '%' character is not followed
        * by a valid 2-digit hexadecimal number
  @@ -297,7 +297,7 @@
   
       /**
        * Decode and return the specified URL-encoded byte array.
  -     * 
  +     *
        * @param bytes The url-encoded byte array
        * @param enc The encoding to use; if null, the default encoding is used
        * @exception IllegalArgumentException if a '%' character is not followed
  @@ -318,7 +318,7 @@
               } else if (b == '%') {
                   b = (byte) ((convertHexDigit(bytes[ix++]) << 4)
                               + convertHexDigit(bytes[ix++]));
  -            } 
  +            }
               bytes[ox++] = b;
           }
           if (enc != null) {
  @@ -351,7 +351,7 @@
        *
        * @param b the character value byte
        *
  -     * Put name and value pair in map.  When name already exist, add value 
  +     * Put name and value pair in map.  When name already exist, add value
        * to array of values.
        */
       private static void putMapEntry( Map map, String name, String value) {
  @@ -388,7 +388,7 @@
        *
        * @exception UnsupportedEncodingException if the data is malformed
        */
  -    public static void parseParameters(Map map, byte[] data, String encoding) 
  +    public static void parseParameters(Map map, byte[] data, String encoding)
           throws UnsupportedEncodingException {
   
           if (data != null && data.length > 0) {
  @@ -399,7 +399,7 @@
               String value = null;
               while (ix < data.length) {
                   byte c = data[ix++];
  -                switch (c) {
  +                switch ((char)c) {
                   case '&':
                       value = new String(data, 0, ox, encoding);
                       if (key != null) {
  @@ -431,8 +431,9 @@
           }
   
       }
  -
   
  + 
   
   }
  +
   
  
  
  

Reply via email to