mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8248233: Avoid superfluous Class::isRecord invocations during deserialization
Co-authored-by: Peter Levart <peter.levart@gmail.com> Reviewed-by: redestad, plevart
This commit is contained in:
parent
34755c3528
commit
42d3bad0b1
2 changed files with 6 additions and 13 deletions
|
@ -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