RFR: 8267921: Remove redundant loop from sun.reflect.misc.ReflectUtil.privateCheckPackageAccess()
Alan Bateman
alanb at openjdk.java.net
Mon May 31 16:13:21 UTC 2021
On Mon, 31 May 2021 07:36:10 GMT, Сергей Цыпанов <github.com+10835776+stsypanov at openjdk.org> wrote:
> This a tiny follop-up of https://github.com/openjdk/jdk/pull/3571.
>
> The loop in `sun.reflect.misc.ReflectUtil.privateCheckPackageAccess()` is redundant since `Class.getPackageName()` will already return the package name of the innermost component type.
getPackageName went through a few iterations in JDK 9 and this is probably a left over.
-------------
Marked as reviewed by alanb (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4268
More information about the core-libs-dev
mailing list