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

@ -138,6 +138,7 @@ import jdk.internal.access.SharedSecrets;
public class HashMap<K,V> extends AbstractMap<K,V>
implements Map<K,V>, Cloneable, Serializable {
@java.io.Serial
private static final long serialVersionUID = 362498820763181265L;
/*
@ -1489,6 +1490,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
* for each key-value mapping. The key-value mappings are
* emitted in no particular order.
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream s)
throws IOException {
int buckets = capacity();
@ -1506,6 +1508,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
* could not be found
* @throws IOException if an I/O error occurs
*/
@java.io.Serial
private void readObject(java.io.ObjectInputStream s)
throws IOException, ClassNotFoundException {
// Read in the threshold (ignored), loadfactor, and any hidden stuff