RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v7]
Chen Liang
liach at openjdk.org
Wed Mar 22 15:35:51 UTC 2023
On Wed, 22 Mar 2023 14:23:45 GMT, ExE Boss <duke at openjdk.org> wrote:
>> Tingjun Yuan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix a whitespace error
>
> src/java.base/share/classes/java/util/ImmutableCollections.java line 1212:
>
>> 1210: if (unseen == 0)
>> 1211: throw new NoSuchElementException();
>> 1212: lastReturned = unseen & -unseen;
>
> Suggestion:
>
> long lastReturned = unseen & -unseen;
Suggestion:
long lastReturned = Long.lowestOneBit(unseen);
More descriptive. Same for below.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12498#discussion_r1145005398
More information about the core-libs-dev
mailing list