8076401: Serialize OIS data

Reviewed-by: alanb, igerasim
This commit is contained in:
Chris Hegarty 2015-04-17 15:28:44 +01:00
parent 490c3dee9c
commit 4799f0adcd

View File

@ -1906,10 +1906,9 @@ public class ObjectInputStream
ObjectStreamClass slotDesc = slots[i].desc; ObjectStreamClass slotDesc = slots[i].desc;
if (slots[i].hasData) { if (slots[i].hasData) {
if (obj != null && if (obj == null || handles.lookupException(passHandle) != null) {
slotDesc.hasReadObjectMethod() && defaultReadFields(null, slotDesc); // skip field values
handles.lookupException(passHandle) == null) } else if (slotDesc.hasReadObjectMethod()) {
{
SerialCallbackContext oldContext = curContext; SerialCallbackContext oldContext = curContext;
try { try {
@ -1946,6 +1945,7 @@ public class ObjectInputStream
defaultSetFieldValues(obj, slotDesc, vals); defaultSetFieldValues(obj, slotDesc, vals);
} }
} }
if (slotDesc.hasWriteObjectData()) { if (slotDesc.hasWriteObjectData()) {
skipCustomData(); skipCustomData();
} else { } else {