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

(bf) MappedByteBuffer should clarify copying between overlapping mappings

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Withdrawn
    • Fix Version/s: 15
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Verbiage added to clarify existing behavior.
    • Interface Kind:
      Java API

      Description

      Summary

      MappedByteBuffer does not specify that bulk copying between overlapping mapped regions of the same file has unspecified results.

      Problem

      If two MappedByteBuffers are created from overlapping ranges of the same file and a bulk copy is performed between them, then surprising and unexpected results may occur.

      Solution

      Add verbiage stating that that bulk copying between MappedByteBuffers mapped from overlapping ranges of the same file has unspecified results.

      Specification

      Add this sentence before the current last sentence of the class level specification of MappedByteBuffer:

      The result of a bulk copy between two {@code MappedByteBuffer}s is unspecified if they are mapped from overlapping regions of the same file.

      A webrev is attached.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bpb Brian Burkhalter
                Reporter:
                bpb Brian Burkhalter
                Reviewed By:
                Paul Sandoz, Roger Riggs
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: