diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/ObjectOutputStream.java --- a/src/java.base/share/classes/java/io/ObjectOutputStream.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java Tue Sep 24 09:43:43 2019 +0100 @@ -232,7 +232,7 @@ * @throws IOException if an I/O error occurs while writing stream header * @throws SecurityException if untrusted subclass illegally overrides * security-sensitive methods - * @throws NullPointerException if out is null + * @throws NullPointerException if {@code out} is {@code null} * @since 1.4 * @see ObjectOutputStream#ObjectOutputStream() * @see ObjectOutputStream#putFields() @@ -259,12 +259,12 @@ * this implementation of ObjectOutputStream. * *

If there is a security manager installed, this method first calls the - * security manager's checkPermission method with a - * SerializablePermission("enableSubclassImplementation") + * security manager's {@code checkPermission} method with a + * {@code SerializablePermission("enableSubclassImplementation")} * permission to ensure it's ok to enable subclassing. * * @throws SecurityException if a security manager exists and its - * checkPermission method denies enabling + * {@code checkPermission} method denies enabling * subclassing. * @throws IOException if an I/O error occurs while creating this stream * @see SecurityManager#checkPermission @@ -429,7 +429,7 @@ * called otherwise. * * @throws IOException if I/O errors occur while writing to the underlying - * OutputStream + * {@code OutputStream} */ public void defaultWriteObject() throws IOException { SerialCallbackContext ctx = curContext; @@ -529,18 +529,18 @@ * *

This method is called exactly once for each unique proxy class * descriptor in the stream. The default implementation of this method in - * ObjectOutputStream does nothing. + * {@code ObjectOutputStream} does nothing. * - *

The corresponding method in ObjectInputStream is - * resolveProxyClass. For a given subclass of - * ObjectOutputStream that overrides this method, the - * resolveProxyClass method in the corresponding subclass of - * ObjectInputStream must read any data or objects written by - * annotateProxyClass. + *

The corresponding method in {@code ObjectInputStream} is + * {@code resolveProxyClass}. For a given subclass of + * {@code ObjectOutputStream} that overrides this method, the + * {@code resolveProxyClass} method in the corresponding subclass of + * {@code ObjectInputStream} must read any data or objects written by + * {@code annotateProxyClass}. * * @param cl the proxy class to annotate custom data for * @throws IOException any exception thrown by the underlying - * OutputStream + * {@code OutputStream} * @see ObjectInputStream#resolveProxyClass(String[]) * @since 1.3 */ @@ -646,16 +646,16 @@ * stream. Subclasses of ObjectOutputStream may override this method to * customize the way in which class descriptors are written to the * serialization stream. The corresponding method in ObjectInputStream, - * readClassDescriptor, should then be overridden to + * {@code readClassDescriptor}, should then be overridden to * reconstitute the class descriptor from its custom stream representation. * By default, this method writes class descriptors according to the format * defined in the Object Serialization specification. * *

Note that this method will only be called if the ObjectOutputStream * is not using the old serialization stream format (set by calling - * ObjectOutputStream's useProtocolVersion method). If this + * ObjectOutputStream's {@code useProtocolVersion} method). If this * serialization stream is using the old format - * (PROTOCOL_VERSION_1), the class descriptor will be written + * ({@code PROTOCOL_VERSION_1}), the class descriptor will be written * internally in a manner that cannot be overridden or customized. * * @param desc class descriptor to write to the stream @@ -889,10 +889,10 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * @throws IllegalArgumentException if name does not + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not - * boolean + * {@code boolean} */ public abstract void put(String name, boolean val); @@ -901,10 +901,10 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * @throws IllegalArgumentException if name does not + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not - * byte + * {@code byte} */ public abstract void put(String name, byte val); @@ -913,10 +913,10 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * @throws IllegalArgumentException if name does not + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not - * char + * {@code char} */ public abstract void put(String name, char val); @@ -925,10 +925,10 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * @throws IllegalArgumentException if name does not + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not - * short + * {@code short} */ public abstract void put(String name, short val); @@ -937,10 +937,10 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * @throws IllegalArgumentException if name does not + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not - * int + * {@code int} */ public abstract void put(String name, int val); @@ -949,10 +949,10 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * @throws IllegalArgumentException if name does not + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not - * long + * {@code long} */ public abstract void put(String name, long val); @@ -961,10 +961,10 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * @throws IllegalArgumentException if name does not + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not - * float + * {@code float} */ public abstract void put(String name, float val); @@ -973,10 +973,10 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * @throws IllegalArgumentException if name does not + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not - * double + * {@code double} */ public abstract void put(String name, double val); @@ -985,8 +985,8 @@ * * @param name the name of the serializable field * @param val the value to assign to the field - * (which may be null) - * @throws IllegalArgumentException if name does not + * (which may be {@code null}) + * @throws IllegalArgumentException if {@code name} does not * match the name of a serializable field for the class whose fields * are being written, or if the type of the named field is not a * reference type @@ -996,18 +996,18 @@ /** * Write the data and fields to the specified ObjectOutput stream, * which must be the same stream that produced this - * PutField object. + * {@code PutField} object. * * @param out the stream to write the data and fields to * @throws IOException if I/O errors occur while writing to the * underlying stream * @throws IllegalArgumentException if the specified stream is not - * the same stream that produced this PutField + * the same stream that produced this {@code PutField} * object * @deprecated This method does not write the values contained by this - * PutField object in a proper format, and may + * {@code PutField} object in a proper format, and may * result in corruption of the serialization stream. The - * correct way to write PutField data is by + * correct way to write {@code PutField} data is by * calling the {@link java.io.ObjectOutputStream#writeFields()} * method. */