On Thu, 5 Dec 2024 15:01:27 GMT, Alan Bateman <al...@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