mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
Merge
This commit is contained in:
commit
55b472251e
14 changed files with 126 additions and 36 deletions
|
@ -2139,11 +2139,6 @@ public class ObjectInputStream
|
|||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("preview")
|
||||
private static boolean isRecord(Class<?> cls) {
|
||||
return cls.isRecord();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads and returns "ordinary" (i.e., not a String, Class,
|
||||
* ObjectStreamClass, array, or enum constant) object, or null if object's
|
||||
|
@ -2182,7 +2177,7 @@ public class ObjectInputStream
|
|||
handles.markException(passHandle, resolveEx);
|
||||
}
|
||||
|
||||
final boolean isRecord = cl != null && isRecord(cl);
|
||||
final boolean isRecord = desc.isRecord();
|
||||
if (isRecord) {
|
||||
assert obj == null;
|
||||
obj = readRecord(desc);
|
||||
|
|
|
@ -747,13 +747,6 @@ public class ObjectStreamClass implements Serializable {
|
|||
}
|
||||
|
||||
this.cl = cl;
|
||||
if (cl != null) {
|
||||
this.isRecord = isRecord(cl);
|
||||
// canonical record constructor is shared
|
||||
this.canonicalCtr = osc.canonicalCtr;
|
||||
// cache of deserialization constructors is shared
|
||||
this.deserializationCtrs = osc.deserializationCtrs;
|
||||
}
|
||||
this.resolveEx = resolveEx;
|
||||
this.superDesc = superDesc;
|
||||
name = model.name;
|
||||
|
@ -770,6 +763,11 @@ public class ObjectStreamClass implements Serializable {
|
|||
|
||||
if (osc != null) {
|
||||
localDesc = osc;
|
||||
isRecord = localDesc.isRecord;
|
||||
// canonical record constructor is shared
|
||||
canonicalCtr = localDesc.canonicalCtr;
|
||||
// cache of deserialization constructors is shared
|
||||
deserializationCtrs = localDesc.deserializationCtrs;
|
||||
writeObjectMethod = localDesc.writeObjectMethod;
|
||||
readObjectMethod = localDesc.readObjectMethod;
|
||||
readObjectNoDataMethod = localDesc.readObjectNoDataMethod;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue