src/java.base/share/classes/java/lang/Throwable.java
changeset 51772 5432cebf6627
parent 47216 71c04702a3d5
child 53947 8e069f7b4fab
--- a/src/java.base/share/classes/java/lang/Throwable.java	Mon Sep 17 14:04:46 2018 -0700
+++ b/src/java.base/share/classes/java/lang/Throwable.java	Mon Sep 17 15:22:46 2018 -0700
@@ -466,6 +466,16 @@
         return this;
     }
 
+    /*
+     * This is called by readObject of a few exceptions such as
+     * ClassNotFoundException and ExceptionInInitializerError to deserialize
+     * a stream output from an older runtime version where the cause may
+     * have set to null.
+     */
+    final void setCause(Throwable t) {
+        this.cause = t;
+    }
+
     /**
      * Returns a short description of this throwable.
      * The result is the concatenation of: