As Claes mentioned in https://github.com/openjdk/jdk/pull/3571#discussion_r640555826 the loop in sun.reflect.misc.ReflectUtil.privateCheckPackageAccess() is redundant since getPackageName() will already return the package name of the innermost component type.
The loop can be then removed.
The loop can be then removed.