mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8229997: Apply java.io.Serial annotations in java.base
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
6d064a747e
commit
9d764ee48e
315 changed files with 880 additions and 254 deletions
|
@ -115,6 +115,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
|||
private transient String toStringCache;
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 3388685877147921107L;
|
||||
|
||||
/**
|
||||
|
@ -723,6 +724,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
|||
* A flag indicating whether the backing array is shared.
|
||||
* The value is ignored upon deserialization.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields =
|
||||
{
|
||||
new java.io.ObjectStreamField("value", char[].class),
|
||||
|
@ -734,6 +736,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
|||
* readObject is called to restore the state of the StringBuffer from
|
||||
* a stream.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private synchronized void writeObject(java.io.ObjectOutputStream s)
|
||||
throws java.io.IOException {
|
||||
java.io.ObjectOutputStream.PutField fields = s.putFields();
|
||||
|
@ -753,6 +756,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
|||
* readObject is called to restore the state of the StringBuffer from
|
||||
* a stream.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(java.io.ObjectInputStream s)
|
||||
throws java.io.IOException, ClassNotFoundException {
|
||||
java.io.ObjectInputStream.GetField fields = s.readFields();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue