src/java.base/share/classes/javax/security/auth/x500/X500Principal.java
changeset 57950 4612a3cfb927
parent 47216 71c04702a3d5
equal deleted inserted replaced
57945:e09c993ac476 57950:4612a3cfb927
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 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
    61  * @see java.security.cert.X509Certificate
    61  * @see java.security.cert.X509Certificate
    62  * @since 1.4
    62  * @since 1.4
    63  */
    63  */
    64 public final class X500Principal implements Principal, java.io.Serializable {
    64 public final class X500Principal implements Principal, java.io.Serializable {
    65 
    65 
       
    66     @java.io.Serial
    66     private static final long serialVersionUID = -500463348111345721L;
    67     private static final long serialVersionUID = -500463348111345721L;
    67 
    68 
    68     /**
    69     /**
    69      * RFC 1779 String format of Distinguished Names.
    70      * RFC 1779 String format of Distinguished Names.
    70      */
    71      */
   492      *
   493      *
   493      * @serialData this {@code X500Principal} is serialized
   494      * @serialData this {@code X500Principal} is serialized
   494      *          by writing out its DER-encoded form
   495      *          by writing out its DER-encoded form
   495      *          (the value of {@code getEncoded} is serialized).
   496      *          (the value of {@code getEncoded} is serialized).
   496      */
   497      */
       
   498     @java.io.Serial
   497     private void writeObject(java.io.ObjectOutputStream s)
   499     private void writeObject(java.io.ObjectOutputStream s)
   498         throws IOException {
   500         throws IOException {
   499         s.writeObject(thisX500Name.getEncodedInternal());
   501         s.writeObject(thisX500Name.getEncodedInternal());
   500     }
   502     }
   501 
   503 
   502     /**
   504     /**
   503      * Reads this object from a stream (i.e., deserializes it).
   505      * Reads this object from a stream (i.e., deserializes it).
   504      */
   506      */
       
   507     @java.io.Serial
   505     private void readObject(java.io.ObjectInputStream s)
   508     private void readObject(java.io.ObjectInputStream s)
   506         throws java.io.IOException,
   509         throws java.io.IOException,
   507                java.io.NotActiveException,
   510                java.io.NotActiveException,
   508                ClassNotFoundException {
   511                ClassNotFoundException {
   509 
   512