RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v56]
Per Minborg
pminborg at openjdk.org
Tue Apr 22 11:37:02 UTC 2025
On Fri, 18 Apr 2025 14:43:19 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address comments on original vs underlying
>
> src/java.base/share/classes/jdk/internal/lang/stable/StableEnumFunction.java line 111:
>
>> 109: min = Math.min(min, ordinal);
>> 110: max = Math.max(max, ordinal);
>> 111: bitSet.set(ordinal);
>
> This doesn't look right wrt the way the bitset is initialized. `ordinal` can be larger than `inputs.size()`. For example for `enum X { A, B, C }` where the key set is `{ C }`.
Good catch!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2053926778
More information about the core-libs-dev
mailing list