RFR: 8345565: Remove remaining SecurityManager motivated APIs from sun.reflect.util [v2]
Chen Liang
liach at openjdk.org
Thu Dec 5 15:19:39 UTC 2024
On Thu, 5 Dec 2024 15:01:27 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java line 138:
>>
>>> 136: assert genericDeclaration instanceof Class<?> ||
>>> 137: genericDeclaration instanceof Method ||
>>> 138: genericDeclaration instanceof Constructor : "Unexpected kind of GenericDeclaration";
>>
>> Can remove this; check is already done in `make` factory.
>
> I had hoped to keep the change focused on the removal of the left over ReflectUtil.checkPackageAccess, the else throw AssertionError was a surprise to see. So yes, I agree it can be removed but I'd prefer not touch it now, future work in this area can remove it.
Indeed, we should clean this up with things like MethodUtil.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22572#discussion_r1871572144
More information about the core-libs-dev
mailing list