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

@ -280,6 +280,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
private static final int MAX_COMPACT_DIGITS = 18;
/* Appease the serialization gods */
@java.io.Serial
private static final long serialVersionUID = 6108874887143696463L;
private static final ThreadLocal<StringBuilderHelper>
@ -4127,6 +4128,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
*
* @param s the stream being read.
*/
@java.io.Serial
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
// Read in all fields
@ -4145,6 +4147,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
*
* @param s the stream to serialize to.
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
// Must inflate to maintain compatible serial form.