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
|
@ -298,6 +298,7 @@ public abstract class DateFormat extends Format {
|
|||
public static final int TIMEZONE_FIELD = 17;
|
||||
|
||||
// Proclaim serial compatibility with 1.1 FCS
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7218322306649953788L;
|
||||
|
||||
/**
|
||||
|
@ -866,6 +867,7 @@ public abstract class DateFormat extends Format {
|
|||
public static class Field extends Format.Field {
|
||||
|
||||
// Proclaim serial compatibility with 1.4 FCS
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7441350119349544720L;
|
||||
|
||||
// table of all instances in this class, used by readResolve
|
||||
|
@ -943,6 +945,7 @@ public abstract class DateFormat extends Format {
|
|||
* @return resolved DateFormat.Field constant
|
||||
*/
|
||||
@Override
|
||||
@java.io.Serial
|
||||
protected Object readResolve() throws InvalidObjectException {
|
||||
if (this.getClass() != DateFormat.Field.class) {
|
||||
throw new InvalidObjectException("subclass didn't correctly implement readResolve");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue