This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.14.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.14.x by this push: new 4463bb0 CAMEL-17441: camel-health - Loading custom health-check from classpath scanning is not added to registry 4463bb0 is described below commit 4463bb028105400d2a092045fc8ba3966137ddb8 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Jan 6 10:44:42 2022 +0100 CAMEL-17441: camel-health - Loading custom health-check from classpath scanning is not added to registry --- .../org/apache/camel/impl/health/DefaultHealthCheckRegistry.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/camel-health/src/main/java/org/apache/camel/impl/health/DefaultHealthCheckRegistry.java b/core/camel-health/src/main/java/org/apache/camel/impl/health/DefaultHealthCheckRegistry.java index d602162..29b38c8 100644 --- a/core/camel-health/src/main/java/org/apache/camel/impl/health/DefaultHealthCheckRegistry.java +++ b/core/camel-health/src/main/java/org/apache/camel/impl/health/DefaultHealthCheckRegistry.java @@ -233,11 +233,10 @@ public class DefaultHealthCheckRegistry extends ServiceSupport implements Health if (!loadHealthChecksDone) { loadHealthChecksDone = true; - DefaultHealthChecksLoader loader = new DefaultHealthChecksLoader(camelContext); Collection<HealthCheck> col = loader.loadHealthChecks(); - - // report how many health checks we have loaded + // register loaded health-checks + col.forEach(this::register); if (col.size() > 0) { String time = TimeUtils.printDuration(watch.taken()); LOG.info("Health checks (scanned: {}) loaded in {}", col.size(), time);