RFR: 8346657: Improve out of bounds exception messages for MemorySegments [v7]

Igor Rudenko duke at openjdk.org
Sat Nov 15 13:39:18 UTC 2025


> Logic for creating IndexOutOfBoundsException in MemorySegment is reworked:
> - separate logic of checking bounds and constructing exception messages for both `access` and `slice` cases 
> - idea presented in [JDK-8288534](https://bugs.openjdk.org/browse/JDK-8288534) slightly reworked with preservation of the original approach

Igor Rudenko has updated the pull request incrementally with one additional commit since the last revision:

  rework: eliminate lambda binding; introduce lightweight wrapper which should be eliminated by escape analysis

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/28124/files
  - new: https://git.openjdk.org/jdk/pull/28124/files/b96a0152..9a2cc138

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28124&range=06
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28124&range=05-06

  Stats: 68 lines in 1 file changed: 41 ins; 24 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/28124.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28124/head:pull/28124

PR: https://git.openjdk.org/jdk/pull/28124


More information about the core-libs-dev mailing list