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

Alan Bateman alanb at openjdk.org
Mon Feb 20 09:42:26 UTC 2023


On Mon, 20 Feb 2023 09:34:17 GMT, David Holmes <dholmes at openjdk.org> wrote:

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

There are a number of APIs that exist to support the Java Language. LambdaMetafactory makes it clear in the first paragraph of its API docs that it supports the lambda expression and method reference expression features of the Java Language. If a Java compiler compiles these language constructs to invokedynamic instructions then the bootstrap methods have to be standard APIs, otherwise the class files won't work on all VM implementations. The APIs adding to j.l.runtime are similar. Maybe some advance tooling/framework might use them directly but it should be rare.

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

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


More information about the core-libs-dev mailing list