On Tue, 24 May 2022 09:26:44 GMT, Maurizio Cimadamore <mcimadam...@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