Hi Gary,

On Tue, 2006-01-24 at 14:14 +0000, Gary Benson wrote:
> I just committed a patch that implements serialization in
> java.net.SocketPermission.  I had to add a dummy field,
> "actions", in order for the serialized representation to
> match that from a proprietary JVM.  This seems sucky, but
> I think it's the only way.

I don't think this is so "sucky", it is kind of clean to have a string
representation of the actions (although the default serialization form
is not actually human readable so it doesn't buy you that much). And if
you really want you don't need to add the field, you could use
ObjectInputStream.readFields() and ObjectOutputStream.putFields(). But I
don't think adding the field and keeping it up to dat when
readObject/writeObject() is called is so bad.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to