diff --git a/_posts/2025-04-07-jandex-3-3-0.adoc b/_posts/2025-04-07-jandex-3-3-0.adoc new file mode 100644 index 00000000..30db9908 --- /dev/null +++ b/_posts/2025-04-07-jandex-3-3-0.adoc @@ -0,0 +1,28 @@ +:page-layout: post +:page-title: Jandex 3.3.0 +:page-synopsis: Jandex 3.3.0 released! +:page-tags: [announcement] +:page-date: 2025-04-07 13:00:00.000 +0100 +:page-author: lthon + += Jandex 3.3.0 + +Today, we announce the https://github.com/smallrye/jandex/releases/tag/3.3.0[release] of Jandex 3.3.0. +This release contains two improvements. + +The `ClassInfo.enclosingClassAlways()` method was added. +Contrary to `enclosingClass()`, which only returns the enclosing class for member classes, this method returns the enclosing class in case of all classes: member, local and anonymous, regardless of their declaration site. +Notably, in case of local and anonymous classes, they can also occur in static initializers, instance initializers and field initializers. +In this case, it wasn't possible to determine the enclosing class before. + +The `IndexView.getKnownDirectImplementations()` and `getAllKnownImplementations()` methods were added. +The `getKnownDirectImplementations()` differs from the existing `getKnownDirectImplementors()` method in that it _doesn't_ return direct subinterfaces, which is most likely what users expect. +The `getAllKnownImplementations()` is not different to `getAllKnownImplementors()` at all, it exists just for symmetry. +Also, the `getKnownDirectImplementors()` and `getAllKnownImplementors()` methods are now deprecated. +Use the `get*Implementations()` methods instead; pay attention to the difference mentioned above, but it shouldn't affect most of the code out there. + +*BREAKING CHANGE:* This Jandex release increments the persistent format version. +This means that indices generated by Jandex 3.3.0 are _not_ readable by previous Jandex versions. +Since the only change in the persistent index is the addition of enclosing class information for the initializer case, it is recommended to stay on the previous format version for most users for a while. + +If you experience any troubles, or if you have any ideas for Jandex improvements, please https://github.com/smallrye/jandex/issues[file an issue].