Integrated: 8357798: ReverseOrderListView uses Boolean boxes after JDK-8356080
Aleksey Shipilev
shade at openjdk.org
Wed Jun 4 06:06:24 UTC 2025
On Mon, 26 May 2025 17:08:45 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> SonarCloud complains that since [JDK-8356080](https://bugs.openjdk.org/browse/JDK-8356080) we are using `Boolean` boxes in `ReverseOrderListView`. This change `boolean` -> `Boolean` was made in [JDK-8356080](https://bugs.openjdk.org/browse/JDK-8356080) to allow `@Stable` folding of boolean field. But it is very awkward to trade in the existence of the boxed object to allow optional constant folding.
>
> We can flatten this field to `byte` and check the specific non-zero values. The field is final, so it is never actually in `0` state.
>
> Additional testing:
> - [x] Linux x86_64 server fastdebug, `java/util`
This pull request has now been integrated.
Changeset: 683319f2
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/683319f25cbea83e28b9a0ad22e1c3e781e78165
Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
8357798: ReverseOrderListView uses Boolean boxes after JDK-8356080
Reviewed-by: liach, smarks
-------------
PR: https://git.openjdk.org/jdk/pull/25456
More information about the core-libs-dev
mailing list