Integrated: 8345944: JEP 492: extending local class in a different static context should not be allowed

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Dec 12 10:56:44 UTC 2024


On Wed, 11 Dec 2024 11:29:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This PR fixes a couple of issues associated with the implementation of the new stricter checks for local class creation defined by JEP 492.
> There are two issues:
> * the new checks do not apply to _all_ local classes, especially those whose owner happens to be a _variable_;
> * the new checks do not apply when a class _extends_ a local class -- that's because javac only checks superclasses in the case the superclass is an _inner_ class

This pull request has now been integrated.

Changeset: 0ad64234
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0ad64234e2fd19ec0435fb00340120153b928f9c
Stats:     275 lines in 6 files changed: 266 ins; 4 del; 5 mod

8345944: JEP 492: extending local class in a different static context should not be allowed
8345953: JEP 492: instantiating local classes in a different static context should not be allowed

Reviewed-by: vromero

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

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


More information about the compiler-dev mailing list