RFR: 8287206: Use WrongThreadException for confinement errors
Uwe Schindler
uschindler at openjdk.java.net
Wed May 25 10:11:24 UTC 2022
On Tue, 24 May 2022 09:26:44 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This patch tweaks the foreign API to use the newly added `WrongThreadException` instead of `IllegalStateException` to report confinement errors.
Thinking more about it: `IllegalStateException` is fine for a closed `MemorySession`. If used by wrong thread the exception was indeed confusing. Now that the abiguity is gone, I can change our (Lucene) code and just transform every ISE to an already closed in our code. I just wanted to bring up that issue here.
PR is here: https://github.com/apache/lucene/pull/912
-------------
PR: https://git.openjdk.java.net/jdk/pull/8865
More information about the core-libs-dev
mailing list