8283417: Update java.nio buffers to use sealed classes

Reviewed-by: rriggs, darcy, iris, alanb
This commit is contained in:
Brian Burkhalter 2022-03-24 16:11:57 +00:00
parent 19f01ab701
commit b36cf35ad9
7 changed files with 45 additions and 8 deletions

View file

@ -70,8 +70,9 @@ import jdk.internal.misc.Unsafe;
* @since 1.4
*/
public abstract class MappedByteBuffer
public abstract sealed class MappedByteBuffer
extends ByteBuffer
permits DirectByteBuffer
{
// This is a little bit backwards: By rights MappedByteBuffer should be a