< prev index next >

src/java.base/share/classes/java/text/MessageFormat.java

Print this page

        

*** 347,356 **** --- 347,357 ---- * @since 1.1 */ public class MessageFormat extends Format { + @java.io.Serial private static final long serialVersionUID = 6479157306784022952L; /** * Constructs a MessageFormat for the default * {@link java.util.Locale.Category#FORMAT FORMAT} locale and the
*** 1151,1160 **** --- 1152,1162 ---- * @since 1.4 */ public static class Field extends Format.Field { // Proclaim serial compatibility with 1.4 FCS + @java.io.Serial private static final long serialVersionUID = 7899943957617360810L; /** * Creates a Field with the specified name. *
*** 1169,1178 **** --- 1171,1181 ---- * * @throws InvalidObjectException if the constant could not be * resolved. * @return resolved MessageFormat.Field constant */ + @java.io.Serial protected Object readResolve() throws InvalidObjectException { if (this.getClass() != MessageFormat.Field.class) { throw new InvalidObjectException("subclass didn't correctly implement readResolve"); }
*** 1599,1608 **** --- 1602,1612 ---- /** * After reading an object from the input stream, do a simple verification * to maintain class invariants. * @throws InvalidObjectException if the objects read from the stream is invalid. */ + @java.io.Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); boolean isValid = maxOffset >= -1 && formats.length > maxOffset && offsets.length > maxOffset
< prev index next >