--- a/src/java.base/share/classes/java/lang/Enum.java Thu Oct 17 20:27:44 2019 +0100
+++ b/src/java.base/share/classes/java/lang/Enum.java Thu Oct 17 20:53:35 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -59,6 +59,8 @@
* @see Class#getEnumConstants()
* @see java.util.EnumSet
* @see java.util.EnumMap
+ * @jls 8.9 Enum Types
+ * @jls 8.9.3 Enum Members
* @since 1.5
*/
@SuppressWarnings("serial") // No serialVersionUID needed due to
@@ -273,17 +275,19 @@
/**
* 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");
}
/**
- * A <a href="package-summary.html#nominal">nominal descriptor</a> for an
+ * A <a href="{@docRoot}/java.base/java/lang/constant/package-summary.html#nominal">nominal descriptor</a> for an
* {@code enum} constant.
*
* @param <E> the type of the enum constant