Hello,

Cleaning out an old bug, please review the CSR and fix for:

    JDK-5075463 : (enum) Serialized Form javadoc for java.lang.Enum is misleading
    http://cr.openjdk.java.net/~darcy/5075463.0/
    CSR: https://bugs.openjdk.java.net/browse/JDK-8209524

The abstract class java.lang.Enum implements Serializable and is the superclass of all enum types. By default a serializable type is added to the serialized form page of the javadoc output. However, in the case of java.lang.Enum, including the type in the serialized form output is misleading since java.lang.Enum cannot be directly instantiated and enum types have special-cased handling in serialization. Adding a "@serial exclude" javadoc tag to the class-level javadoc of java.lang.Enum prevent an entry the the type in the serialized form page.

Patch below.

Thanks,

-Joe

--- old/src/java.base/share/classes/java/lang/Enum.java 2018-08-14 20:48:04.202000000 -0700 +++ new/src/java.base/share/classes/java/lang/Enum.java 2018-08-14 20:48:04.058000000 -0700
@@ -45,6 +45,7 @@
  * java.util.EnumMap map} implementations are available.
  *
  * @param <E> The enum type subclass
+ * @serial exclude
  * @author  Josh Bloch
  * @author  Neal Gafter
  * @see     Class#getEnumConstants()

Reply via email to