RFR: 8258810: Improve enum traits [v2]
Ioi Lam
iklam at openjdk.java.net
Fri Jan 8 01:07:54 UTC 2021
On Fri, 1 Jan 2021 09:44:18 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Please review these miscellaneous improvements to the enum iteration facility.
>> Thanks to @albertnetymk for discussions.
>>
>> (1) Removed some unneeded stuff from EnumIterationTraits.
>>
>> (2) Various similar bits of error checking code are unified and shared via
>> EnumIterationTraits.
>>
>> (3) Casts between the enum type and the underlying type are now done using
>> helper functions in EnumIterationTraits.
>>
>> (4) JDK-8257466 added accessors for the EnumRange bounds and the index for
>> an enumerator, but didn't account for the possibility of an empty subrange.
>> Add assertions for that case.
>>
>> (5) Added some death tests to verify some of the error checking.
>>
>> Testing:
>> mach5 tier1
>
> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
>
> ayang review
Looks good to me
-------------
Marked as reviewed by iklam (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1868
More information about the hotspot-dev
mailing list