mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8229997: Apply java.io.Serial annotations in java.base
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
6d064a747e
commit
9d764ee48e
315 changed files with 880 additions and 254 deletions
|
@ -349,6 +349,7 @@ import java.util.Locale;
|
|||
|
||||
public class MessageFormat extends Format {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6479157306784022952L;
|
||||
|
||||
/**
|
||||
|
@ -1153,6 +1154,7 @@ public class MessageFormat extends Format {
|
|||
public static class Field extends Format.Field {
|
||||
|
||||
// Proclaim serial compatibility with 1.4 FCS
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7899943957617360810L;
|
||||
|
||||
/**
|
||||
|
@ -1171,6 +1173,7 @@ public class MessageFormat extends Format {
|
|||
* 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");
|
||||
|
@ -1601,6 +1604,7 @@ public class MessageFormat extends Format {
|
|||
* 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue