Serialization of empty vector over a socket

Tom Tromey tromey@redhat.com
Tue Jul 23 17:36:00 GMT 2002


>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:

Mark> Sorry I still have no clue. I give up for now.

Try the appended patch.
The first hunk was independently duplicated in Classpath.

Re-merging the serialization code would be nice.  I'm not really
familiar with that code though.

If this works for you (it did for me), I'll check it in.
I'll try to add a new Mauve test for it too.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java/io/ObjectInputStream.java (readObject) [TC_ARRAY]: Don't
	use toString to format array element.

Index: java/io/ObjectInputStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/ObjectInputStream.java,v
retrieving revision 1.11
diff -u -r1.11 ObjectInputStream.java
--- java/io/ObjectInputStream.java 22 Jan 2002 22:40:14 -0000 1.11
+++ java/io/ObjectInputStream.java 24 Jul 2002 00:35:20 -0000
@@ -1,5 +1,5 @@
 /* ObjectInputStream.java -- Class used to read serialized objects
-   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -244,7 +244,7 @@
 	int handle = assignNewHandle (array);
 	readArrayElements (array, componentType);
 	for (int i=0, len=Array.getLength(array); i < len; i++)
-	  dumpElementln ("  ELEMENT[" + i + "]=" + Array.get(array, i).toString());
+	  dumpElementln ("  ELEMENT[" + i + "]=" + Array.get(array, i));
 	ret_val = processResolution (array, handle);
 	break;
       }



More information about the Java mailing list