mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8283470: Update java.lang.invoke.VarHandle to use sealed classes
Reviewed-by: darcy, psandoz
This commit is contained in:
parent
e85fa2f04b
commit
e61ccfba7f
5 changed files with 53 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -37,7 +37,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE;
|
|||
|
||||
final class VarHandle$Type$s {
|
||||
|
||||
static class FieldInstanceReadOnly extends VarHandle {
|
||||
static sealed class FieldInstanceReadOnly extends VarHandle {
|
||||
final long fieldOffset;
|
||||
final Class<?> receiverType;
|
||||
#if[Object]
|
||||
|
@ -381,7 +381,7 @@ final class VarHandle$Type$s {
|
|||
}
|
||||
|
||||
|
||||
static class FieldStaticReadOnly extends VarHandle {
|
||||
static sealed class FieldStaticReadOnly extends VarHandle {
|
||||
final Object base;
|
||||
final long fieldOffset;
|
||||
#if[Object]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue