From 9d764ee48ee7c2e7be7a25aee2ed7bed2fcd2000 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Thu, 29 Aug 2019 16:31:34 -0700 Subject: 8229997: Apply java.io.Serial annotations in java.base Reviewed-by: alanb, rriggs --- src/java.base/share/classes/java/util/Date.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/java.base/share/classes/java/util/Date.java') diff --git a/src/java.base/share/classes/java/util/Date.java b/src/java.base/share/classes/java/util/Date.java index cd246880d7d..671d710c671 100644 --- a/src/java.base/share/classes/java/util/Date.java +++ b/src/java.base/share/classes/java/util/Date.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -154,6 +154,7 @@ public class Date * interoperability with JDK1.1. The Date was modified to write * and read only the UTC time. */ + @java.io.Serial private static final long serialVersionUID = 7523967970034938905L; /** @@ -1318,6 +1319,7 @@ public class Date * is emitted (long). This represents the offset from * January 1, 1970, 00:00:00 GMT in milliseconds. */ + @java.io.Serial private void writeObject(ObjectOutputStream s) throws IOException { @@ -1328,6 +1330,7 @@ public class Date /** * Reconstitute this object from a stream (i.e., deserialize it). */ + @java.io.Serial private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { -- cgit v1.3.1