< prev index next >

## src/java.base/share/classes/javax/security/auth/Subject.java

Print this page

    *** 1,7 ***
      /*
    !  * Copyright (c) 1998, 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
    --- 1,7 ---
      /*
    !  * Copyright (c) 1998, 2021, 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

    *** 947,10 ***
    --- 947,13 ---
              }
          }

          /**
           * Writes this object out to a stream (i.e., serializes it).
    +      *
    +      * @param  oos the {@code ObjectOutputStream} to which data is written
    +      * @throws IOException if an I/O error occurs
           */
          @java.io.Serial
          private void writeObject(java.io.ObjectOutputStream oos)
                      throws java.io.IOException {
              synchronized(principals) {

    *** 958,10 ***
    --- 961,14 ---
              }
          }

          /**
           * Reads this object from a stream (i.e., deserializes it)
    +      *
    +      * @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
           */
          @SuppressWarnings("unchecked")
          @java.io.Serial
          private void readObject(java.io.ObjectInputStream s)
                      throws java.io.IOException, ClassNotFoundException {

    *** 1406,10 ***
    --- 1413,13 ---
               * @serialData If this is a private credential set,
               *      a security check is performed to ensure that
               *      the caller has permission to access each credential
               *      in the set.  If the security check passes,
               *      the set is serialized.
    +          *
    +          * @param  oos the {@code ObjectOutputStream} to which data is written
    +          * @throws IOException if an I/O error occurs
               */
              @java.io.Serial
              private void writeObject(java.io.ObjectOutputStream oos)
                      throws java.io.IOException {

    *** 1425,10 ***
    --- 1435,17 ---
                  fields.put("elements", elements);
                  fields.put("which", which);
                  oos.writeFields();
              }

    +         /**
    +          * Restores the state of this object from the stream.
    +          *
    +          * @param  ois 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
    +          */
              @SuppressWarnings("unchecked")
              @java.io.Serial
              private void readObject(ObjectInputStream ois)
                  throws IOException, ClassNotFoundException
              {

< prev index next >