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

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Nov 18 16:57:23 UTC 2025


On Tue, 18 Nov 2025 15:16:20 GMT, Igor Rudenko <duke at openjdk.org> wrote:

> > It would be better if Preconditions had more primitive, non-throwing variants which just returned true/false. Then we could easily implement whatever logic we wanted on top. Maybe we should look there first, and then come back to improve messages in the FFM API?
> 
> should separate issue on https://bugs.openjdk.org be created for such Preconditions improvement?

It would probably be cleaner, yes

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

PR Comment: https://git.openjdk.org/jdk/pull/28124#issuecomment-3548609447


More information about the core-libs-dev mailing list