On Tue, 9 Jun 2026 14:29:25 GMT, Frederic Parain <[email protected]> wrote:

>> Here's a patch adding argument validation to the factories for the special 
>> arrays.
>> It also aligns the semantic of these factories with other ways to create 
>> arrays with respect to the initialization state of the element type.
>> Some compiler tests needed adjustments because of the new code shape of the 
>> factories.
>> 
>> Thank you.
>> 
>> ---------
>> - [X] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Frederic Parain has updated the pull request incrementally with two 
> additional commits since the last revision:
> 
>  - Refactor array_addressing()
>  - Fix exception

src/java.base/share/classes/jdk/internal/value/ValueClass.java line 158:

> 156:                                              int length) {
> 157:       validateArrayArguments(componentType, length);
> 158:       return newReferenceArray0(componentType, length);

Suggestion:

        validateArrayArguments(componentType, length);
        return newReferenceArray0(componentType, length);

Also see isFlatArray whitespace comment.

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2435#discussion_r3382043617

Reply via email to