< prev index next >

src/java.naming/share/classes/javax/naming/ldap/LdapName.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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

@@ -756,18 +756,33 @@
 
     /**
      * Serializes only the unparsed DN, for compactness and to avoid
      * any implementation dependency.
      *
-     * @serialData      The DN string
+     * @serialData The DN {@code String} representation of this LDAP name.
+     *
+     * @param s the {@code ObjectOutputStream} to write to
+     * @throws java.io.IOException if an I/O error occurs.
      */
+    @java.io.Serial
     private void writeObject(ObjectOutputStream s)
             throws java.io.IOException {
         s.defaultWriteObject();
         s.writeObject(toString());
     }
 
+    /**
+     * Initializes the {@code LdapName} from deserialized data.
+     *
+     * See {@code writeObject} for a description of the serial form.
+     *
+     * @param s the {@code ObjectInputStream} to read from
+     * @throws java.io.IOException if an I/O error occurs.
+     * @throws ClassNotFoundException if the class of a serialized object
+     *         could not be found.
+     */
+    @java.io.Serial
     private void readObject(ObjectInputStream s)
             throws java.io.IOException, ClassNotFoundException {
         s.defaultReadObject();
         unparsed = (String)s.readObject();
         try {
< prev index next >