RFR: 8333854: IllegalAccessError with proxies after JDK-8332457 [v2]
Roger Riggs
rriggs at openjdk.org
Tue Jun 11 21:08:12 UTC 2024
On Mon, 10 Jun 2024 04:08:41 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Please review this patch that fixes a critical issue that breaks some Proxy usages.
>>
>> CONSTANT_Class and CONSTANT_MethodType must fail resolution for inaccessible package-private types per JVMS 5.4.3.1 and 5.4.3.5, yet such types can appear in method descriptors in the same class. The proposed way to bypass is to store the MethodType as its descriptor string in the bootstrap method arguments, and use MethodType.fromMethodDescriptorString to restore the arguments, which does not have this restriction and does not eagerly load the parameter classes. This case isn't covered by existing tests, so a new test has been added.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>
> Obtain classloader in security manager friendly code path
This look ok.
The odd mix of coding styles and mixing of names (CD_) between static imports and local declarations is annoying but is pre-existing noise. It works better for constants than for unqualified method calls (for example, `ofConstantBootstrap`, what class is that in.)
Generally, its a bad idea to assume someone reading code is using an IDE,
source constructs that are not easily searchable or navigable with text tools make it harder to maintain.
-------------
PR Review: https://git.openjdk.org/jdk/pull/19615#pullrequestreview-2111455328
More information about the core-libs-dev
mailing list