RFR: 8345565: Remove remaining SecurityManager motivated APIs from sun.reflect.util [v2]

Alan Bateman alanb at openjdk.org
Thu Dec 5 15:03:38 UTC 2024


On Thu, 5 Dec 2024 14:50:53 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Alan Bateman has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update copyright header end dates
>
> 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.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22572#discussion_r1871541980


More information about the core-libs-dev mailing list