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
|
@ -275,11 +275,13 @@ public abstract class Enum<E extends Enum<E>>
|
|||
/**
|
||||
* prevent default deserialization
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream in) throws IOException,
|
||||
ClassNotFoundException {
|
||||
throw new InvalidObjectException("can't deserialize enum");
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private void readObjectNoData() throws ObjectStreamException {
|
||||
throw new InvalidObjectException("can't deserialize enum");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue