Sockets

Archie Cobbs archie at whistle.com
Tue Nov 24 18:10:35 PST 1998


alice dubois writes:
> I'm trying to run the following program with kaffe but an IOException is 
> caught.
> The responce is:
> "1
>  2
>  catch IOException
>  java.io.IOException"

Yes, this is a bug. I've checked in the fix into CVS. In the meantime,
here's the patch:

Index: libraries/javalib/java/io/DataInputStream.java
===================================================================
RCS file: /cvs/mod/net/kaffe/libraries/javalib/java/io/DataInputStream.java,v
retrieving revision 1.1.1.1.2.2
diff -u -r1.1.1.1.2.2 DataInputStream.java
--- DataInputStream.java	1998/10/28 06:53:43	1.1.1.1.2.2
+++ DataInputStream.java	1998/11/25 02:10:18
@@ -109,8 +109,11 @@
 
 			super.mark(1);
 			data2 = super.read();
-			if (data2 != -1 && (char) (data & 0xff) != '\n')
-				super.reset();
+			if (data2 != -1 && (char) (data & 0xff) != '\n') {
+				try {
+					super.reset();
+				} catch (IOException e) { }
+			}
 			break;
 		}
 		buffer.append(ch);

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


More information about the kaffe mailing list