RFR: 8344912: Sharpen the return type of various internal methods in jdk.internal.foreign [v3]

Per Minborg pminborg at openjdk.org
Mon Nov 25 07:29:15 UTC 2024


On Sun, 24 Nov 2024 03:26:18 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Hi,
>> 
>> This patch sharpens the return types of various internal methods. This helps the compiler to have better information when the corresponding methods are not inlined.
>> 
>> Please take a look and leave your reviews, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix failing tests

src/java.base/share/classes/jdk/internal/foreign/NativeMemorySegmentImpl.java line 39:

> 37:  * a native long address.
> 38:  */
> 39: public sealed class NativeMemorySegmentImpl extends AbstractMemorySegmentImpl permits MappedMemorySegmentImpl {

Why does this class have to be `public`? Maybe it was a change that survived from the larger version of the PR? The same goes for `MappedMemorySegmentImpl`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22344#discussion_r1855972763


More information about the core-libs-dev mailing list