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

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,6 +39,7 @@ public class BuddhistCalendar extends GregorianCalendar {
// Class Variables
//////////////////
@java.io.Serial
private static final long serialVersionUID = -8527488697350388578L;
private static final int BUDDHIST_YEAR_OFFSET = 543;
@ -254,6 +255,7 @@ public class BuddhistCalendar extends GregorianCalendar {
private transient int yearOffset = BUDDHIST_YEAR_OFFSET;
@java.io.Serial
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -163,6 +163,7 @@ public class ZoneInfo extends TimeZone {
*/
private transient boolean dirty = false;
@java.io.Serial
private static final long serialVersionUID = 2653134537216586139L;
/**
@ -726,6 +727,7 @@ public class ZoneInfo extends TimeZone {
return ZoneInfoFile.getAliasMap();
}
@java.io.Serial
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,7 @@ package sun.util.locale;
public class LocaleSyntaxException extends Exception {
@java.io.Serial
private static final long serialVersionUID = 1L;
private int index = -1;