From da9bd5a977ac8e671e2a34d3ebff83cbf508fe51 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Fri, 2 Aug 2024 11:07:03 +0300 Subject: [PATCH] Register superinterfaces of SmallRye FT annotated beans --- .../deployment/SmallRyeFaultToleranceProcessor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/smallrye-fault-tolerance/deployment/src/main/java/io/quarkus/smallrye/faulttolerance/deployment/SmallRyeFaultToleranceProcessor.java b/extensions/smallrye-fault-tolerance/deployment/src/main/java/io/quarkus/smallrye/faulttolerance/deployment/SmallRyeFaultToleranceProcessor.java index d738e8f0f86c0..3db5b392f034a 100644 --- a/extensions/smallrye-fault-tolerance/deployment/src/main/java/io/quarkus/smallrye/faulttolerance/deployment/SmallRyeFaultToleranceProcessor.java +++ b/extensions/smallrye-fault-tolerance/deployment/src/main/java/io/quarkus/smallrye/faulttolerance/deployment/SmallRyeFaultToleranceProcessor.java @@ -242,19 +242,19 @@ void processFallbackMethodsAndClases(BeanArchiveIndexBuildItem beanArchiveIndexB continue; } - // Scan both the hierarchy of the declaring class and its interfaces like in + // Scan both the hierarchy of the declaring class and its (super)interfaces like in // io.smallrye.faulttolerance.internal.SecurityActions.findDeclaredMethodNames DotName name = clazz.name(); while (name != null && !DotNames.OBJECT.equals(name)) { - Set methods = classesToScan.computeIfAbsent(name, k -> new HashSet<>()); - methods.add(fallbackMethod); + classesToScan.computeIfAbsent(name, k1 -> new HashSet<>()).add(fallbackMethod); + clazz.interfaceNames() + .forEach(it -> classesToScan.computeIfAbsent(it, k -> new HashSet<>()).add(fallbackMethod)); ClassInfo classInfo = index.getClassByName(name); if (classInfo == null) { break; } name = classInfo.superName(); } - clazz.interfaceNames().forEach(it -> classesToScan.computeIfAbsent(it, k -> new HashSet<>()).add(fallbackMethod)); } for (Map.Entry> entry : classesToScan.entrySet()) {