mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8234381: API docs should mention special handling of enums in serialization
Reviewed-by: rriggs
This commit is contained in:
parent
d5b423d17c
commit
8534e920b1
2 changed files with 15 additions and 2 deletions
|
@ -47,6 +47,13 @@ import static java.util.Objects.requireNonNull;
|
|||
* found in section 8.9 of
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
* Enumeration types are all serializable and receive special handling
|
||||
* by the serialization mechanism. The serialized representation used
|
||||
* for enum constants cannot be customized. Declarations of methods
|
||||
* and fields that would otherwise interact with serialization are
|
||||
* ignored, including {@code serialVersionUID}; see the <cite>Java
|
||||
* Object Serialization Specification</cite> for details.
|
||||
*
|
||||
* <p> Note that when using an enumeration type as the type of a set
|
||||
* or as the type of the keys in a map, specialized and efficient
|
||||
* {@linkplain java.util.EnumSet set} and {@linkplain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue