API doc enhancement needed for MemorySegment.get/setUtf8String, MemoryAddress.ofLong

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • None
    • Affects Version/s: 19
    • Component/s: core-libs

      1. MemorySegment.get/setUtf8String - Need to mention about -ve offset results in IndexOutOfBoundsException
      Ex. 1: MemorySession.global().allocateUtf8String("HelloWordl").setUtf8String(-1, "JavaWorld");
      Ex.2: MemorySession.global().allocateUtf8String("HelloWordl").getUtf8String(-1);

      2. MemoryAddress.ofLong - Caution to the programmer of VM crash due to unsafe or incorrect usage (like there is for MemoryAddress.get/setUtf8String)
      Ex: MemoryAddress.ofLong(Long.MAX_VALUE).getUtf8String(0)

            Assignee:
            Per-Ake Minborg
            Reporter:
            Prashanthram Gundarlahally
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: