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

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new c6c753fe25 Fix potential NPE in CamelCoreDevUIService on dev mode 
reloads
c6c753fe25 is described below

commit c6c753fe25b87a6c80c315e75be942bb52a2084d
Author: James Netherton <[email protected]>
AuthorDate: Mon May 11 08:34:07 2026 +0100

    Fix potential NPE in CamelCoreDevUIService on dev mode reloads
---
 .../org/apache/camel/quarkus/devui/CamelCoreDevUIService.java    | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/devui/CamelCoreDevUIService.java
 
b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/devui/CamelCoreDevUIService.java
index 34533633b4..04b2ae053f 100644
--- 
a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/devui/CamelCoreDevUIService.java
+++ 
b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/devui/CamelCoreDevUIService.java
@@ -22,6 +22,7 @@ import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
 
 import io.quarkus.arc.Arc;
+import io.quarkus.arc.ArcContainer;
 import io.smallrye.mutiny.Multi;
 import io.smallrye.mutiny.operators.multi.processors.BroadcastProcessor;
 import io.smallrye.mutiny.subscription.Cancellable;
@@ -99,7 +100,13 @@ public class CamelCoreDevUIService {
     }
 
     static DevConsoleRegistry getDevConsoleRegistry() {
-        return Arc.container()
+        ArcContainer container = Arc.container();
+        if (container == null) {
+            // The app is likely performing a dev mode hot reload, thus the 
container may be temporarily unavailable
+            return null;
+        }
+
+        return container
                 .select(CamelContext.class)
                 .get()
                 .getCamelContextExtension()

Reply via email to