W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

Bug in ParseState.java?

From: Bill Wendling <wendling@ncsa.uiuc.edu>
Date: Thu, 26 Dec 1996 10:42:25 -0600 (CST)
To: www-jigsaw@www10.w3.org
Message-ID: <Pine.SOL.3.95.961226103340.7528A-100000@pecos.ncsa.uiuc.edu>
Hi,

I was looking through ParseState.java and found this method in it.  I
don't know if you have addressed it already, but...:

// ParseState.java
// $Id: ParseState.java,v 1.1 1996/08/06 21:12:46 abaird Exp $
// (c) COPYRIGHT MIT and INRIA, 1996.
// Please first read the full copyright statement in file COPYRIGHT.html

package w3c.www.http;

class ParseState {
/* Stuff deleted */

/* 
 * The lower case part is the same as the upper case part.  I think that
 * it was supposed to be:
 *
 *	raw[i] = (((raw[i] >= 'a') && (raw[i] <= 'z'))
 *			? (byte)(raw[i] - 'a' + 'A') : raw[i]);
 */	
    final String toString(byte raw[], boolean lower) {
	if ( lower ) {
	    // To lower case:
	    for (int i = start; i < end ; i++)
		raw[i] = (((raw[i] >= 'A') && (raw[i] <= 'Z'))
			  ? (byte) (raw[i] - 'A' + 'a')
			  : raw[i]);
	} else {
	    // To upper case:
	    for (int i = start; i < end ; i++)
		raw[i] = (((raw[i] >= 'A') && (raw[i] <= 'Z'))
			  ? (byte) (raw[i] - 'A' + 'a')
			  : raw[i]);
	
	}
	return new String(raw, 0, start, end-start);
    }

/* More stuff deleted */
}
Received on Thursday, 26 December 1996 11:42:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT