This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new f245d3aa7de fixed resilience4j-micrometer NPE if enabled == null
(#19063)
f245d3aa7de is described below
commit f245d3aa7de7aed8b14503a3c71d782224e99658
Author: JiriOndrusek <[email protected]>
AuthorDate: Tue Sep 2 15:31:40 2025 +0200
fixed resilience4j-micrometer NPE if enabled == null (#19063)
---
.../src/main/java/org/apache/camel/main/BaseMainSupport.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index 972b665f519..2662a60413b 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -973,7 +973,10 @@ public abstract class BaseMainSupport extends BaseService {
if (mf == null) {
ModelCamelContext model = (ModelCamelContext) camelContext;
Resilience4jConfigurationDefinition config =
model.getResilience4jConfiguration(null);
- boolean micrometer = config != null &&
CamelContextHelper.parseBoolean(camelContext, config.getMicrometerEnabled());
+ //enabled flag can be null (in Camel-Quarkus, which does not
support resilience)
+ //see https://github.com/apache/camel-quarkus/issues/7682
+ boolean micrometer = config != null &&
config.getMicrometerEnabled() != null
+ && CamelContextHelper.parseBoolean(camelContext,
config.getMicrometerEnabled());
if (micrometer) {
throw new IllegalArgumentException(
"Cannot find Resilience4jMicrometerFactory on
classpath. Add camel-resilience4j-micrometer to classpath.");