From dd56182aacc943381e5ba4e564892e2caaf38d8d Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Mon, 8 Jun 2026 14:26:57 +0200 Subject: [PATCH] Jandex 3.6.0 release announcement --- _posts/2026-06-08-jandex-3-6-0.adoc | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 _posts/2026-06-08-jandex-3-6-0.adoc diff --git a/_posts/2026-06-08-jandex-3-6-0.adoc b/_posts/2026-06-08-jandex-3-6-0.adoc new file mode 100644 index 00000000..a7f3399b --- /dev/null +++ b/_posts/2026-06-08-jandex-3-6-0.adoc @@ -0,0 +1,45 @@ +:page-layout: post +:page-title: Jandex 3.6.0 +:page-synopsis: Jandex 3.6.0 released! +:page-tags: [announcement] +:page-date: 2026-06-08 11:00:00.000 +0100 +:page-author: lthon + += Jandex 3.6.0 + +Today, we announce the https://github.com/smallrye/jandex/releases/tag/3.6.0[release] of Jandex 3.6.0. +This release contains a number of improvements and bug fixes. + +The following methods: + +* `IndexView.getAnnotationsWithRepeatable()` +* `AnnotationTarget.annotationsWithRepeatable()` +* `AnnotationTarget.declaredAnnotationsWithRepeatable()` +* `Type.annotationsWithRepeatable()` + +require an annotation name on the input, together with an index that is used to obtain the annotation class. +The annotation class is used to figure out if the annotation is repeatable and if so, to obtain the name of the container annotation. + +Very often, when these methods are called, the user knows that the annotation is repeatable and has access to the name of the container annotation. +For these cases, this release adds overloads that, instead of an index, accept a name of the container annotation directly. + +*BREAKING CHANGE:* This change adds one method to the `IndexView` interface, which is sometimes implemented by user code. +It should be relatively straightforward to implement, similarly to the existing implementation of `getAnnotationsWithRepeatable()`. + +A class `JandexKotlin` was added that contains a small number of helper methods that are common when working with Kotlin code. + +The `ClassInfo` class intentionally doesn't provide equality (as in, doesn't override `equals()`). +While this seems questionable, there is a good reason for it: if you have a composite index representing multiple JARs (each sub-index of the composite corresponding to one JAR), those JARs may contain duplicate classes. +To be able to faithfully represent such case, equality cannot be based just on a class name, and `ClassInfo` currently doesn't contain any other information that would help distinguish classes with the same name but coming from different JARs. +Hence, equality of `ClassInfo` is just identity. +However, `ClassInfo` didn't override `hashCode()` either. +The default `hashCode()` implementation is not deterministic, which is bad for various reproducibility efforts (including `CompositeIndex`). +Therefore, since this release, `ClassInfo` does override `hashCode()` (but not `equals()`!). +The hash code is based on the class name, which leads to collisions in case of duplicate classes, but those are relatively rare, so this shouldn't be an issue. + +Creating an `EquivalenceKey` for array types was fixed in case the array type contained type annotations on the array dimensions. + +One more case of invalid type annotation paths generated by the Kotlin compiler was found, and this release adds a workaround. +Thanks Liam Miller-Cushon for the bug report! + +If you experience any troubles, or if you have any ideas for Jandex improvements, please https://github.com/smallrye/jandex/issues[file an issue].