RFR: 8346609: Improve MemorySegment.toString [v6]
Maurizio Cimadamore
mcimadamore at openjdk.org
Tue Jan 7 13:02:52 UTC 2025
On Tue, 7 Jan 2025 12:58:12 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> This PR proposes to improve the current `MemorySegment.toString()` method from:
>>
>> `MemorySegment{ address: 0x60000264c540, byteSize: 8 }`
>>
>> to
>>
>> `MemorySegment{ native, address: 0x60000264c540, byteSize: 8}`
>>
>> Tests passes tier1-tier3
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Rename variable
Marked as reviewed by mcimadamore (Reviewer).
src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java line 490:
> 488: public String toString() {
> 489: final String kind;
> 490: if (this instanceof HeapMemorySegmentImpl) {
could also be a "virtual" method
-------------
PR Review: https://git.openjdk.org/jdk/pull/22826#pullrequestreview-2534281439
PR Review Comment: https://git.openjdk.org/jdk/pull/22826#discussion_r1905422287
More information about the core-libs-dev
mailing list