Withdrawn: 8349716: IllegalAccessError when Proxy methods return object of a package-private type
Chen Liang
liach at openjdk.org
Sun Apr 13 09:52:38 UTC 2025
On Tue, 11 Feb 2025 17:56:04 GMT, Chen Liang <liach at openjdk.org> wrote:
> The return value adaption of Proxy is problematic, that it may attempt to access package-private types inaccessible to its package in a `checkcast` instruction, which causes `IllegalAccessError` if the returned object is not `null`. This likely affects all Java versions since the publication of OpenJDK.
>
> A practical effect of this is that if a repeatable annotation is package-private but the container is not, user code cannot access the `value` element in the container annotation.
>
> All added tests except `PackagePrivateContainerTest::testGetRepeatable` fail on current mainline and pass with the ProxyGenerator patch.
>
> Testing: Running tier 1-3
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/jdk/pull/23567
More information about the core-libs-dev
mailing list