RFR: 8306075: Micro-optimize Enum.hashCode [v5]

Pavel Rappo prappo at openjdk.org
Mon Apr 17 16:07:38 UTC 2023


On Mon, 17 Apr 2023 15:55:38 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> olivergillespie has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Switch to non-javadoc comment and remove markup
>
> src/java.base/share/classes/java/lang/Enum.java line 171:
> 
>> 169:     }
>> 170: 
>> 171:     /*
> 
> Should be `/**` (Javadoc style), like other `private` fields.

I think the reviewers are fine with the essence of this PR. As for the comment, we could split it in two: the javadoc part, which stays with the field, and the inline part, which moves to the method. See String.hash and String::hashCode.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13491#discussion_r1168963655


More information about the core-libs-dev mailing list