RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]
Volker Simonis
simonis at openjdk.org
Mon Feb 20 08:52:35 UTC 2023
On Fri, 17 Feb 2023 21:21:56 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> > (because they are all not referenced from the program any more).
>
> So, it sounds like this is testing a case where `LambdaMetafactory.metafactory` is being called directly?
>
> I'd like to point out that, while I buy that people are doing this (I see enough of this on StackOverflow), `LambdaMetafactory` is a runtime API specifically designed to support a language feature. Calling it directly is an unintended use case.
Sorry, but that's a really weird argument. You can't introduce a new public API and then blame people for using it! If the API is really only intended to support the internal implementation of a language feature than make it private and don't export it.
-------------
PR: https://git.openjdk.org/jdk/pull/12493
More information about the core-libs-dev
mailing list