This commit is contained in:
Jesper Wilhelmsson 2022-01-10 17:06:23 +00:00
commit d9b1bb5860
24 changed files with 538 additions and 137 deletions

View file

@ -767,7 +767,11 @@ public abstract class Buffer {
final void checkScope() {
ScopedMemoryAccess.Scope scope = scope();
if (scope != null) {
scope.checkValidState();
try {
scope.checkValidState();
} catch (ScopedMemoryAccess.Scope.ScopedAccessError e) {
throw new IllegalStateException("This segment is already closed");
}
}
}