On Tue, 18 Aug 2026 10:40:01 GMT, Johan Sjölen <[email protected]> wrote:

>> When creating a new array of type T, the type T should not be initialized. 
>> This is the case for all types (classes and value classes). The reason that 
>> this code was added is probably because in a previous Valhalla model, the VM 
>> filled in a default value for each flattened array element, which 
>> necessitated the initialization of the class.
>> 
>> ---------
>> - [X] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Johan Sjölen has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Document the method

test/hotspot/jtreg/runtime/valhalla/inlinetypes/FlatArrayDoesNotInitialize.java 
line 28:

> 26:  * @test
> 27:  * @summary Test that creating an array of T does not initialize class T
> 28:  * @library /test/lib

Nit - I can't spot any test library usage in this test. Is this needed?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32193#discussion_r3806202534

Reply via email to