--- old/src/java.naming/share/classes/javax/naming/ldap/LdapName.java 2020-08-25 15:53:57.866313394 +0100 +++ new/src/java.naming/share/classes/javax/naming/ldap/LdapName.java 2020-08-25 15:53:57.706316310 +0100 @@ -1,5 +1,5 @@ /* - * 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 @@ -758,14 +758,29 @@ * 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();