< prev index next >

## src/java.base/share/classes/java/lang/Throwable.java

Print this page

    *** 1,7 ***
      /*
    !  * 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
       * under the terms of the GNU General Public License version 2 only, as
       * published by the Free Software Foundation.  Oracle designates this
    --- 1,7 ---
      /*
    !  * Copyright (c) 1994, 2020, 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
       * under the terms of the GNU General Public License version 2 only, as
       * published by the Free Software Foundation.  Oracle designates this

    *** 900,10 ***
    --- 900,14 ---
           * stackTrace} field.
           *
           * Note that there are no constraints on the value the {@code
           * cause} field can hold; both {@code null} and {@code this} are
           * valid values for the field.
    +      *
    +      * @param  s the {@code ObjectInputStream} from which data is read
    +      * @throws IOException if an I/O error occurs
    +      * @throws ClassNotFoundException if a serialized class cannot be loaded
           */
          @java.io.Serial
          private void readObject(ObjectInputStream s)
              throws IOException, ClassNotFoundException {
              s.defaultReadObject();     // read in all fields

    *** 989,10 ***
    --- 993,13 ---
           * Write a {@code Throwable} object to a stream.
           *
           * A {@code null} stack trace field is represented in the serial
           * form as a one-element array whose element is equal to {@code
           * new StackTraceElement("", "", null, Integer.MIN_VALUE)}.
    +      *
    +      * @param  s the {@code ObjectOutputStream} to which data is written
    +      * @throws IOException if an I/O error occurs
           */
          @java.io.Serial
          private synchronized void writeObject(ObjectOutputStream s)
              throws IOException {
              // Ensure that the stackTrace field is initialized to a

< prev index next >