Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311593

Minor doc issue in MemorySegment::copy

XMLWordPrintable

        The copy overloads:

            static void copy(MemorySegment srcSegment, long srcOffset,
                             MemorySegment dstSegment, long dstOffset, long bytes)

        And

            static void copy(MemorySegment srcSegment, ValueLayout srcElementLayout, long srcOffset,
                             MemorySegment dstSegment, ValueLayout dstElementLayout, long dstOffset,
                             long elementCount)

        Refer to 'this segment' in their javadoc:

            If the source segment overlaps with *this segment*...

        This should the 'the destination segment' instead. Since both of these methods are static, there is no 'this segment'.

              mcimadamore Maurizio Cimadamore
              jvernee Jorn Vernee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: