a patch to java.util.Properties.java

Archie Cobbs archie at dellroad.org
Thu Apr 12 17:34:59 PDT 2001


Ito Kazumitsu writes:
> This is a patch to java.util.Properties.java, without which
> load(InputStream) goes into an infinite loop if end of file
> appears before '\n'.
> 
> --- Properties.java.orig	Sat Jul 22 07:53:23 2000
> +++ Properties.java	Mon Apr  9 15:46:39 2001
> @@ -162,7 +162,11 @@
>  		switch (ch) {
>  			case '#':
>  			case '!':
> -				while ((ch = in.read()) != '\n');
> +				while (true) {
> +					ch = in.read();
> +					if (ch == -1) return false;
> +					if (ch == '\n') break;
> +				}
>  				continue;
>  			case -1:
>  				return false;

Thanks, should be fixed now.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com


More information about the kaffe mailing list