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

apupier 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 9181598e51 chore: Deployment cleanup and modernization
9181598e51 is described below

commit 9181598e51299c0faedcbc639ad3c280b7dc1cc8
Author: Sanjana <[email protected]>
AuthorDate: Thu Feb 5 00:44:57 2026 +0530

    chore: Deployment cleanup and modernization
---
 .../core/deployment/CamelNativeImageProcessor.java | 36 ++++++++++++----------
 .../core/deployment/util/PathFilterTest.java       | 31 ++++++++++---------
 2 files changed, 35 insertions(+), 32 deletions(-)

diff --git 
a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelNativeImageProcessor.java
 
b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelNativeImageProcessor.java
index fe0b4cc3a6..1be317eef1 100644
--- 
a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelNativeImageProcessor.java
+++ 
b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelNativeImageProcessor.java
@@ -107,23 +107,7 @@ public class CamelNativeImageProcessor {
         List<ClassInfo> converterClasses = view.getAnnotations(converter)
                 .stream()
                 .filter(ai -> ai.target().kind() == Kind.CLASS)
-                .filter(ai -> {
-                    AnnotationValue av = ai.value("loader");
-                    boolean isLoader = av != null && av.asBoolean();
-                    // filter out camel-base converters which are 
automatically inlined in the
-                    // CoreStaticTypeConverterLoader
-                    // need to revisit with Camel 3.0.0-M3 which should 
improve this area
-                    if 
(ai.target().asClass().name().toString().startsWith("org.apache.camel.converter."))
 {
-                        LOGGER.debug("Ignoring core " + ai + " " + 
ai.target().asClass().name());
-                        return false;
-                    } else if (isLoader) {
-                        LOGGER.debug("Ignoring " + ai + " " + 
ai.target().asClass().name());
-                        return false;
-                    } else {
-                        LOGGER.debug("Accepting " + ai + " " + 
ai.target().asClass().name());
-                        return true;
-                    }
-                })
+                .filter(this::shouldRegisterConverter)
                 .map(ai -> ai.target().asClass())
                 .collect(Collectors.toList());
 
@@ -146,6 +130,24 @@ public class CamelNativeImageProcessor {
                         .methods().build());
     }
 
+    private boolean 
shouldRegisterConverter(org.jboss.jandex.AnnotationInstance ai) {
+        AnnotationValue av = ai.value("loader");
+        boolean isLoader = av != null && av.asBoolean();
+        // filter out camel-base converters which are automatically inlined in 
the
+        // CoreStaticTypeConverterLoader
+        // need to revisit with Camel 3.0.0-M3 which should improve this area
+        if 
(ai.target().asClass().name().toString().startsWith("org.apache.camel.converter."))
 {
+            LOGGER.debug("Ignoring core " + ai + " " + 
ai.target().asClass().name());
+            return false;
+        } else if (isLoader) {
+            LOGGER.debug("Ignoring " + ai + " " + 
ai.target().asClass().name());
+            return false;
+        } else {
+            LOGGER.debug("Accepting " + ai + " " + 
ai.target().asClass().name());
+            return true;
+        }
+    }
+
     @BuildStep
     void camelServices(
             List<CamelServiceBuildItem> camelServices,
diff --git 
a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/util/PathFilterTest.java
 
b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/util/PathFilterTest.java
index 48af89a80e..fbb0b2acfe 100644
--- 
a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/util/PathFilterTest.java
+++ 
b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/util/PathFilterTest.java
@@ -71,21 +71,22 @@ public class PathFilterTest {
     @Test
     public void pathFilter() {
         PathFilter.Builder builder = new PathFilter.Builder();
-        Stream.of("/foo/bar/*", "moo/mar/*")
-                .forEach(path -> {
-                    if (FileUtil.isWindows()) {
-                        path = path.replace("/", File.pathSeparator);
-                    }
-                    builder.include(path);
-                });
-
-        Stream.of("/foo/baz/*", "moo/maz/*")
-                .forEach(path -> {
-                    if (FileUtil.isWindows()) {
-                        path = path.replace("/", File.pathSeparator);
-                    }
-                    builder.exclude(path);
-                });
+        List<String> includes = List.of("/foo/bar/*", "moo/mar/*");
+        List<String> excludes = List.of("/foo/baz/*", "moo/maz/*");
+
+        for (String path : includes) {
+            if (FileUtil.isWindows()) {
+                path = path.replace("/", File.pathSeparator);
+            }
+            builder.include(path);
+        }
+
+        for (String path : excludes) {
+            if (FileUtil.isWindows()) {
+                path = path.replace("/", File.pathSeparator);
+            }
+            builder.exclude(path);
+        }
 
         Predicate<Path> predicate = builder
                 .include("/foo/bar/*")

Reply via email to