8287206: Use WrongThreadException for confinement errors

Reviewed-by: alanb, darcy, mchung
This commit is contained in:
Maurizio Cimadamore 2022-05-25 09:50:55 +00:00
parent e17118aa8a
commit e1f140d270
12 changed files with 253 additions and 104 deletions

View file

@ -1022,8 +1022,10 @@ public abstract class FileChannel
*
* @throws IllegalStateException
* If the {@code session} is not
* {@linkplain MemorySession#isAlive() alive}, or if access occurs
* from a thread other than the thread
* {@linkplain MemorySession#isAlive() alive}.
*
* @throws WrongThreadException
* If this method is called from a thread other than the thread
* {@linkplain MemorySession#ownerThread() owning} the
* {@code session}.
*