8229997: Apply java.io.Serial annotations in java.base

Reviewed-by: alanb, rriggs
This commit is contained in:
Joe Darcy 2019-08-29 16:31:34 -07:00
parent 6d064a747e
commit 9d764ee48e
315 changed files with 880 additions and 254 deletions

View file

@ -109,6 +109,7 @@ import jdk.internal.util.ArraysSupport;
public class ArrayList<E> extends AbstractList<E>
implements List<E>, RandomAccess, Cloneable, java.io.Serializable
{
@java.io.Serial
private static final long serialVersionUID = 8683452581122892189L;
/**
@ -849,6 +850,7 @@ public class ArrayList<E> extends AbstractList<E>
* instance is emitted (int), followed by all of its elements
* (each an {@code Object}) in the proper order.
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
// Write out element count, and any hidden stuff
@ -876,6 +878,7 @@ public class ArrayList<E> extends AbstractList<E>
* could not be found
* @throws java.io.IOException if an I/O error occurs
*/
@java.io.Serial
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {