On Fri, 13 May 2022 09:43:55 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
>> src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java line 1164: >> >>> 1162: } >>> 1163: if (unmapper != null) { >>> 1164: AbstractMemorySegmentImpl segment = new >>> MappedMemorySegmentImpl(unmapper.address(), unmapper, size, >> >> When reviewing the method for MappedByteBuffer: I think to make this >> consistent the "old" method should also use `address()` which applies the >> pagePosition. Currently it is confusing: >> - New code returning `MemorySegment` uses `unmapper.address()` >> - Old code returning `MappedByteBuffer` uses `unmapper.address + >> unmapper.pagePosition` (fields) >> >> Should I open an issue or a PR to fix this (because this is already merged)? >> >> See the mailing list posts: >> - https://mail.openjdk.java.net/pipermail/panama-dev/2022-May/016981.html >> - https://mail.openjdk.java.net/pipermail/panama-dev/2022-May/016990.html > > Please file an RFE. I suspect that there will be more little improvements and > consolidation like this we'll want to make to this code. RFE = issue? ------------- PR: https://git.openjdk.java.net/jdk/pull/7888