RFR: 8345565: Remove remaining SecurityManager motivated APIs from sun.reflect.util [v2]
Alan Bateman
alanb at openjdk.org
Thu Dec 5 14:46:14 UTC 2024
> We hollowed out ReflectUtil as one of the early steps when removing the code for running in the SecurityManager execution mode. Most of the usages have now been removed so the empty (and unused) methods can be removed. FieldUtils and ConstructorUtils can be removed too.
>
> ObjectInputStream/ObjectOutputStream has a left over package access check for the subclassing case that can be removed.
>
> sun.reflect.generics.reflectiveObjects.TypeVariableImpl.getGenericDeclaration has a left over package access check that can be removed. I've changed the "should not happen" case to be an assert for now but it's in the wrong place. If we have a JDK bug in this area then it should be caught at construction time, not by the accessor method. This PR is focused on removing the use of ReflectUtil so don't want to do any more here.
>
> The changes for java.management missed a usage ConstructorUtil.getConstructor in MBeanInstantiator.findConstructor. This is replaced, to allow ConstructorUtils be removed.
>
> Testing: tier1-5
Alan Bateman has updated the pull request incrementally with one additional commit since the last revision:
Update copyright header end dates
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22572/files
- new: https://git.openjdk.org/jdk/pull/22572/files/90530053..bd77ee66
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22572&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22572&range=00-01
Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/22572.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22572/head:pull/22572
PR: https://git.openjdk.org/jdk/pull/22572
More information about the serviceability-dev
mailing list