Skip to content

Commit eddc83e

Browse files
authored
Merge pull request quarkusio#36105 from Ladicek/jandex-3.1.5
Upgrade to Jandex 3.1.5
2 parents edb0616 + fcbd46d commit eddc83e

File tree

9 files changed

+34
-19
lines changed

9 files changed

+34
-19
lines changed

bom/application/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<bouncycastle.tls.fips.version>1.0.16</bouncycastle.tls.fips.version>
2121
<expressly.version>5.0.0</expressly.version>
2222
<findbugs.version>3.0.2</findbugs.version>
23-
<jandex.version>3.1.3</jandex.version>
23+
<jandex.version>3.1.5</jandex.version>
2424
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
2525
<javax.inject.version>1</javax.inject.version>
2626
<parsson.version>1.1.2</parsson.version>

build-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<failsafe-plugin.version>${version.surefire.plugin}</failsafe-plugin.version>
3434

3535
<!-- Jandex versions -->
36-
<jandex.version>3.1.3</jandex.version>
36+
<jandex.version>3.1.5</jandex.version>
3737
<jandex-gradle-plugin.version>1.0.0</jandex-gradle-plugin.version>
3838

3939
<asciidoctorj.version>2.5.10</asciidoctorj.version>

independent-projects/arc/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<version.jta>2.0.1</version.jta>
4949
<!-- main versions -->
5050
<version.gizmo>1.7.0</version.gizmo>
51-
<version.jandex>3.1.3</version.jandex>
51+
<version.jandex>3.1.5</version.jandex>
5252
<version.jboss-logging>3.5.3.Final</version.jboss-logging>
5353
<version.mutiny>2.2.0</version.mutiny>
5454
<version.bridger>1.6.Final</version.bridger>

independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InjectionPointInfo.java

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,8 @@ public TypeAndQualifiers(Type type, Set<AnnotationInstance> qualifiers) {
388388
public int hashCode() {
389389
final int prime = 31;
390390
int result = 1;
391-
result = prime * result + ((qualifiers == null) ? 0 : qualifiers.hashCode());
391+
// We cannot use AnnotationInstance#hashCode() as it includes the AnnotationTarget
392+
result = prime * result + annotationSetHashCode(qualifiers);
392393
result = prime * result + ((type == null) ? 0 : type.hashCode());
393394
return result;
394395
}
@@ -409,8 +410,8 @@ public boolean equals(Object obj) {
409410
if (other.qualifiers != null) {
410411
return false;
411412
}
412-
} else if (!qualifiersAreEqual(qualifiers, other.qualifiers)) {
413-
// We cannot use AnnotationInstance#equals() as it requires the exact same annotationTarget instance
413+
} else if (!annotationSetEquals(qualifiers, other.qualifiers)) {
414+
// We cannot use AnnotationInstance#equals() as it requires the exact same AnnotationTarget instance
414415
return false;
415416
}
416417
if (type == null) {
@@ -423,30 +424,44 @@ public boolean equals(Object obj) {
423424
return true;
424425
}
425426

426-
private boolean qualifiersAreEqual(Set<AnnotationInstance> q1, Set<AnnotationInstance> q2) {
427-
if (q1 == q2) {
427+
private static boolean annotationSetEquals(Set<AnnotationInstance> s1, Set<AnnotationInstance> s2) {
428+
if (s1 == s2) {
428429
return true;
429430
}
430-
if (q1.size() != q2.size()) {
431+
if (s1.size() != s2.size()) {
431432
return false;
432433
}
433-
for (AnnotationInstance a1 : q1) {
434-
for (AnnotationInstance a2 : q2) {
435-
if (!annotationsAreEqual(a1, a2)) {
434+
for (AnnotationInstance a1 : s1) {
435+
for (AnnotationInstance a2 : s2) {
436+
if (!annotationEquals(a1, a2)) {
436437
return false;
437438
}
438439
}
439440
}
440441
return true;
441442
}
442443

443-
private boolean annotationsAreEqual(AnnotationInstance a1, AnnotationInstance a2) {
444+
private static boolean annotationEquals(AnnotationInstance a1, AnnotationInstance a2) {
444445
if (a1 == a2) {
445446
return true;
446447
}
447448
return a1.name().equals(a2.name()) && a1.values().equals(a2.values());
448449
}
449450

451+
private static int annotationSetHashCode(Set<AnnotationInstance> s) {
452+
int result = 1;
453+
for (AnnotationInstance a : s) {
454+
result = 31 * result + annotationHashCode(a);
455+
}
456+
return result;
457+
}
458+
459+
private static int annotationHashCode(AnnotationInstance a) {
460+
int result = a.name().hashCode();
461+
result = 31 * result + a.values().hashCode();
462+
return result;
463+
}
464+
450465
}
451466

452467
}

independent-projects/bootstrap/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<version.compiler.plugin>3.11.0</version.compiler.plugin>
4141
<version.enforcer.plugin>3.2.1</version.enforcer.plugin>
4242
<version.surefire.plugin>3.1.2</version.surefire.plugin>
43-
<jandex.version>3.1.3</jandex.version>
43+
<jandex.version>3.1.5</jandex.version>
4444

4545
<!-- Dependency versions -->
4646
<assertj.version>3.24.2</assertj.version>

independent-projects/junit5-virtual-threads/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<compiler.plugin.version>3.11.0</compiler.plugin.version>
4545
<enforcer.plugin.version>3.2.1</enforcer.plugin.version>
4646
<surefire.plugin.version>3.1.2</surefire.plugin.version>
47-
<jandex.version>3.1.3</jandex.version>
47+
<jandex.version>3.1.5</jandex.version>
4848
<formatter-maven-plugin.version>2.23.0</formatter-maven-plugin.version>
4949
<impsort-maven-plugin.version>1.9.0</impsort-maven-plugin.version>
5050

@@ -295,4 +295,4 @@
295295
</profile>
296296
</profiles>
297297

298-
</project>
298+
</project>

independent-projects/qute/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<maven.compiler.release>11</maven.compiler.release>
4444
<version.junit>5.10.0</version.junit>
4545
<version.assertj>3.24.2</version.assertj>
46-
<version.jandex>3.1.3</version.jandex>
46+
<version.jandex>3.1.5</version.jandex>
4747
<version.gizmo>1.7.0</version.gizmo>
4848
<version.jboss-logging>3.5.3.Final</version.jboss-logging>
4949
<version.compiler.plugin>3.11.0</version.compiler.plugin>

independent-projects/resteasy-reactive/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<maven.compiler.release>11</maven.compiler.release>
4949
<!-- Versions -->
5050
<jakarta.enterprise.cdi-api.version>4.0.1</jakarta.enterprise.cdi-api.version>
51-
<jandex.version>3.1.3</jandex.version>
51+
<jandex.version>3.1.5</jandex.version>
5252
<bytebuddy.version>1.12.12</bytebuddy.version>
5353
<junit5.version>5.10.0</junit5.version>
5454
<maven.version>3.9.3</maven.version>

independent-projects/tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<version.surefire.plugin>3.1.2</version.surefire.plugin>
6363
<quarkus.version>${project.version}</quarkus.version>
6464
<maven-model-helper.version>25</maven-model-helper.version>
65-
<jandex.version>3.1.3</jandex.version>
65+
<jandex.version>3.1.5</jandex.version>
6666
<system-stubs-jupiter.version>2.0.2</system-stubs-jupiter.version>
6767
<awaitility.version>4.2.0</awaitility.version>
6868
</properties>

0 commit comments

Comments
 (0)