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

Reply via email to