You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/01/05 13:18:45 UTC

[camel-spring-boot] branch camel-spring-boot-3.14.x updated: CAMEL-17436: Disabling health check for single route or consumer is not possible

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-spring-boot-3.14.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/camel-spring-boot-3.14.x by this push:
     new 5830e4d  CAMEL-17436: Disabling health check for single route or consumer is not possible
5830e4d is described below

commit 5830e4dcafab0d3bae4940fca062cffc51c0f1b4
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jan 5 14:15:29 2022 +0100

    CAMEL-17436: Disabling health check for single route or consumer is not possible
---
 .../spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java
index 497c183..d349c47 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java
@@ -113,6 +113,9 @@ public class CamelHealthCheckAutoConfiguration {
             for (String id : config.getConfig().keySet()) {
                 CamelHealthCheckConfigurationProperties.HealthCheckConfigurationProperties hcc = config.getConfig().get(id);
                 String parent = hcc.getParent();
+                if (parent == null) {
+                    throw new IllegalArgumentException("HealthCheck with id: " + id + " must have parent configured");
+                }
                 // lookup health check by id
                 Object hc = hcr.getCheck(id).orElse(null);
                 if (hc == null) {