RFR: 8346657: Improve out of bounds exception messages for MemorySegments [v8]
Per Minborg
pminborg at openjdk.org
Tue Nov 18 13:16:08 UTC 2025
On Mon, 17 Nov 2025 17:39:44 GMT, Chen Liang <liach at openjdk.org> wrote:
> I don't think the two private interfaces approach works - since there is only one `RuntimeException apply(String, List)` in AMSI, JLS mandates a compile error, and even if we compile, JVMS says any of these two methods can be chosen regardless of casting.
There are other ways to solve the problem if we want to go down this path. But perhaps it is better to implement a more low-level version of Preconditions.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28124#issuecomment-3547601009
More information about the core-libs-dev
mailing list