Integrated: 8299505: findVirtual on array classes incorrectly restricts the receiver type
Chen Liang
liach at openjdk.org
Wed May 31 16:32:09 UTC 2023
On Sat, 6 May 2023 18:15:56 GMT, Chen Liang <liach at openjdk.org> wrote:
> The access hack for array class clone is only applied to `checkAccess` but missing before call to `restrictProtectedReceiver`, causing the array receiver type to be incorrectly replaced by the lookupClass type. This patch fixes that and adds a test to ensure an original lookup resolves `clone` for both array classes (public) and Object (inherited protected) correctly, and restores the old MethodHandlesGeneralTest from [JDK-8001105](https://bugs.openjdk.org/browse/JDK-8001105) which ensures correctness for publicLookup (which is already correct).
This pull request has now been integrated.
Changeset: 78aa5f3f
Author: Chen Liang <liach at openjdk.org>
Committer: Mandy Chung <mchung at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/78aa5f3fc1c7fc7929e0d2b5d94da0827483b7c5
Stats: 104 lines in 3 files changed: 88 ins; 9 del; 7 mod
8299505: findVirtual on array classes incorrectly restricts the receiver type
Reviewed-by: mchung
-------------
PR: https://git.openjdk.org/jdk/pull/13855
More information about the core-libs-dev
mailing list