mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8248318: Remove superfluous use of boxing in ObjectStreamClass
Reviewed-by: jlaskey, dfuchs, rriggs, chegar
This commit is contained in:
parent
6b7575bbb0
commit
e9d7c07bda
1 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -510,7 +510,7 @@ public class ObjectStreamClass implements Serializable {
|
||||||
AccessController.doPrivileged(new PrivilegedAction<>() {
|
AccessController.doPrivileged(new PrivilegedAction<>() {
|
||||||
public Void run() {
|
public Void run() {
|
||||||
if (isEnum) {
|
if (isEnum) {
|
||||||
suid = Long.valueOf(0);
|
suid = 0L;
|
||||||
fields = NO_FIELDS;
|
fields = NO_FIELDS;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -555,7 +555,7 @@ public class ObjectStreamClass implements Serializable {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
suid = Long.valueOf(0);
|
suid = 0L;
|
||||||
fields = NO_FIELDS;
|
fields = NO_FIELDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ public class ObjectStreamClass implements Serializable {
|
||||||
this.superDesc = superDesc;
|
this.superDesc = superDesc;
|
||||||
isProxy = true;
|
isProxy = true;
|
||||||
serializable = true;
|
serializable = true;
|
||||||
suid = Long.valueOf(0);
|
suid = 0L;
|
||||||
fields = NO_FIELDS;
|
fields = NO_FIELDS;
|
||||||
if (osc != null) {
|
if (osc != null) {
|
||||||
localDesc = osc;
|
localDesc = osc;
|
||||||
|
@ -698,7 +698,7 @@ public class ObjectStreamClass implements Serializable {
|
||||||
ObjectStreamClass superDesc)
|
ObjectStreamClass superDesc)
|
||||||
throws InvalidClassException
|
throws InvalidClassException
|
||||||
{
|
{
|
||||||
long suid = Long.valueOf(model.getSerialVersionUID());
|
long suid = model.getSerialVersionUID();
|
||||||
ObjectStreamClass osc = null;
|
ObjectStreamClass osc = null;
|
||||||
if (cl != null) {
|
if (cl != null) {
|
||||||
osc = lookup(cl, true);
|
osc = lookup(cl, true);
|
||||||
|
@ -796,7 +796,7 @@ public class ObjectStreamClass implements Serializable {
|
||||||
throws IOException, ClassNotFoundException
|
throws IOException, ClassNotFoundException
|
||||||
{
|
{
|
||||||
name = in.readUTF();
|
name = in.readUTF();
|
||||||
suid = Long.valueOf(in.readLong());
|
suid = in.readLong();
|
||||||
isProxy = false;
|
isProxy = false;
|
||||||
|
|
||||||
byte flags = in.readByte();
|
byte flags = in.readByte();
|
||||||
|
@ -1846,7 +1846,7 @@ public class ObjectStreamClass implements Serializable {
|
||||||
int mask = Modifier.STATIC | Modifier.FINAL;
|
int mask = Modifier.STATIC | Modifier.FINAL;
|
||||||
if ((f.getModifiers() & mask) == mask) {
|
if ((f.getModifiers() & mask) == mask) {
|
||||||
f.setAccessible(true);
|
f.setAccessible(true);
|
||||||
return Long.valueOf(f.getLong(null));
|
return f.getLong(null);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue