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

@ -91,6 +91,7 @@ public class HashSet<E>
extends AbstractSet<E>
implements Set<E>, Cloneable, java.io.Serializable
{
@java.io.Serial
static final long serialVersionUID = -5024744406713321676L;
private transient HashMap<E,Object> map;
@ -271,6 +272,7 @@ public class HashSet<E>
* (int), followed by all of its elements (each an Object) in
* no particular order.
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
// Write out any hidden serialization magic
@ -292,6 +294,7 @@ public class HashSet<E>
* Reconstitute the {@code HashSet} instance from a stream (that is,
* deserialize it).
*/
@java.io.Serial
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
// Read in any hidden serialization magic