RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Sep 22 14:14:20 UTC 2023


On Fri, 22 Sep 2023 14:08:29 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/foreign/SegmentAllocator.java line 310:
>> 
>>> 308: 
>>> 309:     /**
>>> 310:      * {@return a new memory segment with a {@linkplain MemorySegment#byteSize() byteSize()} of
>> 
>> Suggestion:
>> 
>>      * {@return a new memory segment with a {@linkplain MemorySegment#byteSize() byte size} of
>
> Also, in the panama repo I see this:
> 
> Allocates a memory segment with the given layout and initializes it with the bytes in the provided source memory segment.
> 
> Which seems more correct - e.g. more consistent with other allocation methods, and also more succinct (note that the first sentence is really what shows up in the method summary javadoc, so there is a certain interest in providing a quick description of what the method does,

Panama repo change:
https://github.com/openjdk/panama-foreign/commit/06e2017883c939188103c4dd53185417a00b2921

But, this code was altered in a follow up merge - maybe the merge was problematic?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15103#discussion_r1334437424


More information about the build-dev mailing list