RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v6]

Per Minborg pminborg at openjdk.org
Tue Dec 12 15:29:46 UTC 2023


> This PR proposes to change the specification for some methods that take `long` offsets so that they will throw an `IllegalArgumentException` rather than an `IndexOutOfBoundsException` for negative values.
> 
> The PR also proposes to fix a bug where the allocation size would overflow and the specified exception was not thrown.

Per Minborg has updated the pull request incrementally with one additional commit since the last revision:

  Correct exception type in JavaDocs for SA:allocateFrom

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17079/files
  - new: https://git.openjdk.org/jdk/pull/17079/files/d67e079e..c1407f77

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

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/17079.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17079/head:pull/17079

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


More information about the core-libs-dev mailing list