commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient URIUtil.java
Date Sat, 05 Jan 2002 03:22:25 GMT
jefft       02/01/04 19:22:25

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        URIUtil.java
  Log:
  Typecast chars to ints, to get things compiling in jikes. Chars are 16 bit
  unsigned, bytes are 8 bit signed.
  
  Revision  Changes    Path
  1.4       +26 -26    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URIUtil.java
  
  Index: URIUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URIUtil.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- URIUtil.java	4 Oct 2001 17:49:12 -0000	1.3
  +++ URIUtil.java	5 Jan 2002 03:22:25 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URIUtil.java,v
1.3 2001/10/04 17:49:12 rwaldhoff Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/10/04 17:49:12 $
  + * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URIUtil.java,v
1.4 2002/01/05 03:22:25 jefft Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/01/05 03:22:25 $
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -85,7 +85,7 @@
    * @author Remy Maucherat
    * @author Park, Sung-Gu
    * @author Rodney Waldhoff
  - * @version $Revision: 1.3 $ $Date: 2001/10/04 17:49:12 $
  + * @version $Revision: 1.4 $ $Date: 2002/01/05 03:22:25 $
    */
   
   public class URIUtil {
  @@ -700,30 +700,30 @@
        */
       private static final byte convertHexDigit(byte b) {
           switch(b) {
  -            case '0':
  -            case '1':
  -            case '2':
  -            case '3':
  -            case '4':
  -            case '5':
  -            case '6':
  -            case '7':
  -            case '8':
  -            case '9':
  +            case (byte)'0':
  +            case (byte)'1':
  +            case (byte)'2':
  +            case (byte)'3':
  +            case (byte)'4':
  +            case (byte)'5':
  +            case (byte)'6':
  +            case (byte)'7':
  +            case (byte)'8':
  +            case (byte)'9':
                   return (byte)(b - '0');
  -            case 'a':
  -            case 'b':
  -            case 'c':
  -            case 'd':
  -            case 'e':
  -            case 'f':
  +            case (byte)'a':
  +            case (byte)'b':
  +            case (byte)'c':
  +            case (byte)'d':
  +            case (byte)'e':
  +            case (byte)'f':
                   return (byte)(b - 'a' + 10);
  -            case 'A':
  -            case 'B':
  -            case 'C':
  -            case 'D':
  -            case 'E':
  -            case 'F':
  +            case (byte)'A':
  +            case (byte)'B':
  +            case (byte)'C':
  +            case (byte)'D':
  +            case (byte)'E':
  +            case (byte)'F':
                   return (byte)(b - 'A' + 10);
               default:
                   throw new IllegalArgumentException(b + " is not a hex value");
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message