mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue