src/java.base/share/classes/java/lang/ClassNotFoundException.java
changeset 57956 e0b8b019d2f5
parent 51772 5432cebf6627
child 58288 48e480e56aad
--- a/src/java.base/share/classes/java/lang/ClassNotFoundException.java	Thu Aug 29 18:52:30 2019 -0400
+++ b/src/java.base/share/classes/java/lang/ClassNotFoundException.java	Thu Aug 29 16:31:34 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2004, 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
@@ -59,6 +59,7 @@
     /**
      * use serialVersionUID from JDK 1.1.X for interoperability
      */
+     @java.io.Serial
      private static final long serialVersionUID = 9176873029745254542L;
 
     /**
@@ -111,6 +112,7 @@
      *
      * @serialField ex Throwable
      */
+    @java.io.Serial
     private static final ObjectStreamField[] serialPersistentFields = {
         new ObjectStreamField("ex", Throwable.class)
     };
@@ -124,6 +126,7 @@
      * in the older implementation and ClassNotFoundException::cause
      * was set to null.
      */
+    @java.io.Serial
     private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
         ObjectInputStream.GetField fields = s.readFields();
         Throwable exception = (Throwable) fields.get("ex", null);
@@ -136,6 +139,7 @@
      * To maintain compatibility with older implementation, write a serial
      * "ex" field with the cause as the value.
      */
+    @java.io.Serial
     private void writeObject(ObjectOutputStream out) throws IOException {
         ObjectOutputStream.PutField fields = out.putFields();
         fields.put("ex", super.getCause());