--- old/src/java.base/share/classes/jdk/internal/access/foreign/MemoryAddressProxy.java 2019-12-09 18:35:50.159185430 +0000 +++ new/src/java.base/share/classes/jdk/internal/access/foreign/MemoryAddressProxy.java 2019-12-09 18:35:49.711174564 +0000 @@ -31,6 +31,11 @@ * an incubating module) to be accessed from the memory access var handles. */ public interface MemoryAddressProxy { + /** + * Check that memory access is within spatial and temporal bounds. + * @throws IllegalStateException if underlying segment has been closed already. + * @throws IndexOutOfBoundsException if access is out-of-bounds. + */ void checkAccess(long offset, long length, boolean readOnly); long unsafeGetOffset(); Object unsafeGetBase();