RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type [v2]
Chen Liang
liach at openjdk.org
Wed May 31 01:40:22 UTC 2023
> 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).
Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
- Update per review
- Merge branch 'master' into fix/lookup-array-clone
- 8299505: findVirtual on array classes incorrectly restricts the receiver type
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/13855/files
- new: https://git.openjdk.org/jdk/pull/13855/files/789144dc..532ea964
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=13855&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=13855&range=00-01
Stats: 169789 lines in 2935 files changed: 127292 ins; 20477 del; 22020 mod
Patch: https://git.openjdk.org/jdk/pull/13855.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13855/head:pull/13855
PR: https://git.openjdk.org/jdk/pull/13855
More information about the core-libs-dev
mailing list