On Mon, 27 Jun 2022 11:01:59 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

> This patch fixes an issue where the default method implementation of the 
> SegmentAllocator::allcoateArray methods do not conform to the javadoc. The 
> javadoc says that specific `allocateArray` methods delegate to 
> `allocateArray(MemoryLayout, size)` - but this does not happen; instead these 
> methods just delegate to `allocate(MemoryLayout)`.
> 
> I've addressed this, and added a test - when doing that, I also realized that 
> we had a problem when a `null` array was passed to the array allocation 
> methods (possible with varargs). In such edge case, we should just skip the 
> copy operation (and also remove the spurious `checkNonNull`).

This pull request has now been integrated.

Changeset: 2c8ada68
Author:    Maurizio Cimadamore <mcimadam...@openjdk.org>
URL:       
https://git.openjdk.org/jdk19/commit/2c8ada689f7bcfc39a04b0bf36c9aea156d47690
Stats:     49 lines in 3 files changed: 43 ins; 1 del; 5 mod

8289188: SegmentAllocator:allocateArray(*) default behavior mismatch to spec

Reviewed-by: alanb

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

PR: https://git.openjdk.org/jdk19/pull/74

Reply via email to