src/java.base/share/classes/java/util/Random.java
changeset 57956 e0b8b019d2f5
parent 52220 9c260a6b6471
child 59086 214afc7a1e02
child 59201 b24f4caa1411
--- a/src/java.base/share/classes/java/util/Random.java	Thu Aug 29 18:52:30 2019 -0400
+++ b/src/java.base/share/classes/java/util/Random.java	Thu Aug 29 16:31:34 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -76,6 +76,7 @@
 public
 class Random implements java.io.Serializable {
     /** use serialVersionUID from JDK 1.1 for interoperability */
+    @java.io.Serial
     static final long serialVersionUID = 3905348978240129619L;
 
     /**
@@ -1168,6 +1169,7 @@
      * @serialField      haveNextNextGaussian boolean
      *              nextNextGaussian is valid
      */
+    @java.io.Serial
     private static final ObjectStreamField[] serialPersistentFields = {
         new ObjectStreamField("seed", Long.TYPE),
         new ObjectStreamField("nextNextGaussian", Double.TYPE),
@@ -1178,6 +1180,7 @@
      * Reconstitute the {@code Random} instance from a stream (that is,
      * deserialize it).
      */
+    @java.io.Serial
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException {
 
@@ -1197,6 +1200,7 @@
     /**
      * Save the {@code Random} instance to a stream.
      */
+    @java.io.Serial
     private synchronized void writeObject(ObjectOutputStream s)
         throws IOException {