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

Clarify javadoc for MemoryLayout::offsetHandle

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 23
    • 22, 23
    • core-libs
    • None

      The implementation for offsetHandle adds bounds checks for each of the long indices provided to that handle. The upper bound for each index is determined by the particular path element expression used to select through a sequence layout.

      Currently, we describe, in non-normative text, what is the range of the corresponding index in the javadoc for PathElement::sequenceElement. But we do not document that MemoryLayout::offsetHandle can indeed throw IndexOutOfBoundException if an index is found outside such bounds. The javadoc should clarify that.

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

              Created:
              Updated:
              Resolved: