From 5bdb08cf9a3218f43d1de66bd8205a9939777575 Mon Sep 17 00:00:00 2001 From: Eric Wittmann Date: Wed, 28 Aug 2024 09:21:41 -0400 Subject: [PATCH] Additional error handling in config index processor --- .../config/index/deployment/ConfigIndexProcessor.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config-index/deployment/src/main/java/apicurio/common/app/components/config/index/deployment/ConfigIndexProcessor.java b/config-index/deployment/src/main/java/apicurio/common/app/components/config/index/deployment/ConfigIndexProcessor.java index 82cd4a4..f1dafcf 100644 --- a/config-index/deployment/src/main/java/apicurio/common/app/components/config/index/deployment/ConfigIndexProcessor.java +++ b/config-index/deployment/src/main/java/apicurio/common/app/components/config/index/deployment/ConfigIndexProcessor.java @@ -37,9 +37,13 @@ import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.runtime.RuntimeValue; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; class ConfigIndexProcessor { + private static final Logger log = LoggerFactory.getLogger(ConfigIndexProcessor.class); + @BuildStep @Record(ExecutionTime.RUNTIME_INIT) void syntheticBean(DynamicPropertiesInfoRecorder recorder, BeanDiscoveryFinishedBuildItem beanDiscovery, BuildProducer syntheticBeans) { @@ -78,6 +82,9 @@ void syntheticBean(DynamicPropertiesInfoRecorder recorder, BeanDiscoveryFinished return def; } catch (Exception e) { + if (e.getMessage().contains("Not a parameterized type")) { + log.error("Invalid type for @Dynamic config property (must be Supplier)"); + } throw new RuntimeException(e); } })