RFR: 8349716: IllegalAccessError when Proxy methods return object of a package-private type
Alan Bateman
alanb at openjdk.org
Sun Apr 13 17:40:23 UTC 2025
On Sun, 13 Apr 2025 09:49:46 GMT, Chen Liang <liach at openjdk.org> wrote:
> Proxy currently places proxy classes that proxy interfaces with package-private return types in dynamic modules. This means that if a return value is non-null, Proxy cannot return it and throws IllegalAccessError.
>
> This patch changes strategy so proxy classes for any reference to package-private types (in parameter or return) are now considered as package-private, tightening the restrictions on proxy factories.
I've set this PR to require at least 2 Reviewers, I think it will take time to work through and decide if the spec should be changed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24611#issuecomment-2800046785
More information about the core-libs-dev
mailing list