This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Serialization of empty vector over a socket


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

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

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

I looked at the Classpath implementation.  It uses native methods to
get around the access checks.  Do you think we should take the same
approach?  I guess it doesn't matter too much, given that getField()
will return a new field at each invocation.  It's up to you; this
patch is fine by me, but if you feel like doing a bit more Classpath
merging... :-)

The natField.cc patch is fine, regardless of the above.  It should
definitely go in.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]