src/java.base/share/classes/java/security/CodeSource.java
changeset 57950 4612a3cfb927
parent 57792 1b6806340400
child 58679 9c3209ff7550
equal deleted inserted replaced
57945:e09c993ac476 57950:4612a3cfb927
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    48  * @since 1.2
    48  * @since 1.2
    49  */
    49  */
    50 
    50 
    51 public class CodeSource implements java.io.Serializable {
    51 public class CodeSource implements java.io.Serializable {
    52 
    52 
       
    53     @java.io.Serial
    53     private static final long serialVersionUID = 4977541819976013951L;
    54     private static final long serialVersionUID = 4977541819976013951L;
    54 
    55 
    55     /**
    56     /**
    56      * The code location.
    57      * The code location.
    57      *
    58      *
   520      * {@code int} specifying the length of the certificate encoding,
   521      * {@code int} specifying the length of the certificate encoding,
   521      * followed by the certificate encoding itself which is written out as an
   522      * followed by the certificate encoding itself which is written out as an
   522      * array of bytes. Finally, if any code signers are present then the array
   523      * array of bytes. Finally, if any code signers are present then the array
   523      * of code signers is serialized and written out too.
   524      * of code signers is serialized and written out too.
   524      */
   525      */
       
   526     @java.io.Serial
   525     private void writeObject(java.io.ObjectOutputStream oos)
   527     private void writeObject(java.io.ObjectOutputStream oos)
   526         throws IOException
   528         throws IOException
   527     {
   529     {
   528         oos.defaultWriteObject(); // location
   530         oos.defaultWriteObject(); // location
   529 
   531 
   554     }
   556     }
   555 
   557 
   556     /**
   558     /**
   557      * Restores this object from a stream (i.e., deserializes it).
   559      * Restores this object from a stream (i.e., deserializes it).
   558      */
   560      */
       
   561     @java.io.Serial
   559     private void readObject(java.io.ObjectInputStream ois)
   562     private void readObject(java.io.ObjectInputStream ois)
   560         throws IOException, ClassNotFoundException
   563         throws IOException, ClassNotFoundException
   561     {
   564     {
   562         CertificateFactory cf;
   565         CertificateFactory cf;
   563         Hashtable<String, CertificateFactory> cfs = null;
   566         Hashtable<String, CertificateFactory> cfs = null;