Skip to content

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Apr 4, 2025

The enclosingClassAlways() returns an enclosing class not only for member classes, but also for local and anonymous classes, regardless of their declaration place. They may be declared in the body of a method or constructor, or in a static, instance or field initializer.

The behavior of enclosingClass() doesn't change.

Note that this commit increments the persistent format version.

Fixes #509

The `enclosingClassAlways()` returns an enclosing class not only for
member classes, but also for local and anonymous classes, regardless
of their declaration place. They may be declared in the body of a method
or constructor, or in a static, instance or field initializer.

The behavior of `enclosingClass()` doesn't change.

Note that this commit increments the persistent format version.
@Ladicek Ladicek added the serialization-format-change Changes that affect index serialization format label Apr 4, 2025
@Ladicek Ladicek added this to the 3.3.0 milestone Apr 4, 2025
@Ladicek Ladicek merged commit f1aed7d into smallrye:main Apr 4, 2025
35 checks passed
@Ladicek Ladicek deleted the improve-finding-enclosing-class branch April 4, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
serialization-format-change Changes that affect index serialization format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow figuring out the enclosing class of a local/anonymous class declared in a static/instance/field initializer
1 participant