Serialization of empty vector over a socket

Mark Wielaard mark@klomp.org
Wed Jul 24 01:57:00 GMT 2002


Hi,

On Wed, 2002-07-24 at 02:42, Tom Tromey wrote:
> 
> 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.

Argh. The exception was thrown in the debug code.
How could I have missed that?

This does work for the simple empty Vector test case,
but not for the attached testcase with a Vector that contains a couple
of Integer objects. Those contain final fields for which a
IllegalAccessException is thrown when we try to set them.

The attached diffs for natField.cc and ObjectInputStream.java make it
also work for that case. But it might be possible to optimize it a bit
since AccessibleObject can also set multiple fields at once.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SerVector.java
Type: text/x-java
Size: 1097 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20020724/4911f92c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: natField.diff
Type: text/x-patch
Size: 728 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20020724/4911f92c/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ObjectInputStream.diff
Type: text/x-patch
Size: 2459 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20020724/4911f92c/attachment-0002.bin>


More information about the Java mailing list