RFR: 8224243: Make AccessibleObject a sealed class [v2]
Kasper Nielsen
kasperni at gmail.com
Sun May 23 17:16:45 UTC 2021
On Fri, 21 May 2021 at 03:44, Joe Darcy <darcy at openjdk.java.net> wrote:
> > Conceptually, AccessbileObject is a sealed class with a protected
> constructor stating
> >
> > Constructor: only used by the Java Virtual Machine.
> >
> > With the language now supporting sealed classes, the AccessbileObject
> should be marked as sealed.
> >
> > Executable and Field are the subclasses of AccessbileObject in the JDK;
> as Executable has subclasses, it is marked as non-sealed.
> >
> > Please also review the corresponding CSR:
> >
> > https://bugs.openjdk.java.net/browse/JDK-8224243
>
> Joe Darcy has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Update in response to review feedback.
>
> -------------
>
The implementation of setAccessible(boolean) is identical on both
Method/Constructor/Field so it could probably be pulled down into
AccessibleObject, similar to trySetAccessible().
/Kasper
More information about the core-libs-dev
mailing list