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

SegmentAllocator:allocateArray(*) default behavior mismatch to spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 19
    • 19
    • core-libs

        As per the spec of
        https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/lang/foreign/SegmentAllocator.html#allocateArray(java.lang.foreign.ValueLayout.OfByte,byte...)

        "Implementation Requirements:
        the default implementation for this method calls this.allocateArray(layout, array.length)."

        Expectations :

        invoking SegmentAllocator:allocateArray(*) shall delegate a call to allocateArray(MemoryLayout elementLayout, long count)

        Actual :

        The method allocateArray(MemoryLayout elementLayout,
         long count) not invoked

              mcimadamore Maurizio Cimadamore
              kganapureddy Krushnareddy Ganapureddy
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: