RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

David Holmes dholmes at openjdk.org
Mon Feb 20 09:37:30 UTC 2023


On Mon, 20 Feb 2023 08:49:38 GMT, Volker Simonis <simonis at openjdk.org> wrote:

> 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.

The spec states:

> API Note:
>   These linkage methods are designed to support the evaluation of lambda expressions and method references in the Java Language. 

The API has to be public as the call gets injected into application code.

-------------

PR: https://git.openjdk.org/jdk/pull/12493


More information about the core-libs-dev mailing list