Skip to content

Commit 6569b25

Browse files
committed
8311593: Minor doc issue in MemorySegment::copy
Reviewed-by: jvernee
1 parent 623cfcd commit 6569b25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java.base/share/classes/java/lang/foreign/MemorySegment.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ static MemorySegment ofAddress(long address) {
12521252
* {@code srcOffset} through {@code srcOffset + bytes - 1} in the source segment are copied into the destination
12531253
* segment at offset {@code dstOffset} through {@code dstOffset + bytes - 1}.
12541254
* <p>
1255-
* If the source segment overlaps with this segment, then the copying is performed as if the bytes at
1255+
* If the source segment overlaps with the destination segment, then the copying is performed as if the bytes at
12561256
* offset {@code srcOffset} through {@code srcOffset + bytes - 1} in the source segment were first copied into a
12571257
* temporary segment with size {@code bytes}, and then the contents of the temporary segment were copied into
12581258
* the destination segment at offset {@code dstOffset} through {@code dstOffset + bytes - 1}.
@@ -1300,7 +1300,7 @@ static void copy(MemorySegment srcSegment, long srcOffset,
13001300
* If the byte order of the two element layouts differ, the bytes corresponding to each element to be copied
13011301
* are swapped accordingly during the copy operation.
13021302
* <p>
1303-
* If the source segment overlaps with this segment, then the copying is performed as if the bytes at
1303+
* If the source segment overlaps with the destination segment, then the copying is performed as if the bytes at
13041304
* offset {@code srcOffset} through {@code srcOffset + (elementCount * S) - 1} in the source segment were first copied into a
13051305
* temporary segment with size {@code bytes}, and then the contents of the temporary segment were copied into
13061306
* the destination segment at offset {@code dstOffset} through {@code dstOffset + (elementCount * S) - 1}.

0 commit comments

Comments
 (0)