On Tue, 29 Oct 2024 12:55:32 GMT, Aleksey Shipilev <[email protected]> wrote:
>> src/java.base/share/classes/java/lang/Byte.java line 128:
>>
>>> 126: }
>>> 127: archivedCache = c;
>>> 128: } else if (archivedCache.length != size) {
>>
>> The `else` case for the non-int boxed type should never happen. Add `assert
>> archivedCache.length == size;` in the if case instead?
>
> Yes, it should never happen. I wanted to have a clean failure if it _does
> happen_, without relying on system assertions being enabled.
Anyway, I agree that asserts should probably capture this better. We would
capture this bug with `-esa` testing.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21737#discussion_r1822269271