On Mon, 17 Apr 2023 15:41:34 GMT, olivergillespie <d...@openjdk.org> wrote:
>> Yes, it is a bit strange to see @implNote here as this is a private field >> that isn't going to show up in the javadoc. The javadoc for non-transient >> fields in Serializable classes does show up in the Serialized Form page but >> this Enum which is special. > > Thanks, so I'll switch to a `/*` comment with no markup? No. Existing `private` fields, `name` and `ordinal` use Javadoc-style `/**` comment. New field should use `/**` to match the style. The only thing that we might want is to move implementation discussion into the method body, like this: /** * The hash code of this enumeration constant. */ @Stable private int hash; /** * Returns a hash code for this enum constant. * * @return a hash code for this enum constant. */ public final int hashCode() { // Once initialized, the hash field value does not change. // HotSpot's identity hash code generation also never returns zero // as the identity hash code. This makes zero a convenient marker // for the un-initialized value for both @Stable and the lazy // initialization code below. int hc = hash; if (hc == 0) { hc = hash = System.identityHashCode(this); } return hc; } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13491#discussion_r1168987865