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

@ -492,6 +492,7 @@ public class TreeSet<E> extends AbstractSet<E>
* set's Comparator, or by the elements' natural ordering if
* the set has no Comparator).
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
// Write out any hidden stuff
@ -512,6 +513,7 @@ public class TreeSet<E> extends AbstractSet<E>
* Reconstitute the {@code TreeSet} 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 stuff
@ -554,5 +556,6 @@ public class TreeSet<E> extends AbstractSet<E>
return TreeMap.keySpliteratorFor(m);
}
@java.io.Serial
private static final long serialVersionUID = -2479143000061671589L;
}