mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8287809: Revisit implementation of memory session
Reviewed-by: jvernee
This commit is contained in:
parent
cb6e9cb728
commit
fed3af8ae0
21 changed files with 328 additions and 383 deletions
|
@ -37,7 +37,6 @@ import jdk.internal.vm.annotation.ForceInline;
|
|||
|
||||
import java.io.FileDescriptor;
|
||||
import java.lang.foreign.MemorySegment;
|
||||
import java.lang.foreign.MemorySession;
|
||||
import java.util.Objects;
|
||||
import java.util.Spliterator;
|
||||
|
||||
|
@ -771,11 +770,7 @@ public abstract sealed class Buffer
|
|||
final void checkSession() {
|
||||
MemorySessionImpl session = session();
|
||||
if (session != null) {
|
||||
try {
|
||||
session.checkValidState();
|
||||
} catch (ScopedMemoryAccess.ScopedAccessError e) {
|
||||
throw new IllegalStateException("This segment is already closed");
|
||||
}
|
||||
session.checkValidState();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue