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 looks okay too to me, and the null case too.

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

Marked as reviewed by alanb (Reviewer).

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

Reply via email to