gansheer commented on code in PR #9428:
URL: https://github.com/apache/camel-quarkus/pull/9428#discussion_r4787928698


##########
extensions/langchain4j-ingest/runtime/src/main/java/org/apache/camel/quarkus/component/langchain4j/ingest/IngestRoutes.java:
##########
@@ -420,19 +420,13 @@ private static ProcessorDefinition<?> 
parseSteps(ProcessorDefinition<?> route, S
                         + " the parse - a parsed document must not supply its 
own identity");
             }
         });
-        String[] include = patterns(includeId);
-        String[] exclude = patterns(excludeId);
-        if (include != null || exclude != null) {
+        if (!includeId.isBlank() || !excludeId.isBlank()) {

Review Comment:
   This guard checks the raw strings, but `IngestIdFilter` normalises them: a 
value like "," or " , " is non-blank here yet parses to no patterns, so the 
route gets a choice whose predicate is always false (the old `patterns()` 
helper returned null for it and skipped the branch entirely). Harmless — the 
predicate never filters anything — but if you want the previous behaviour, 
expose an `IngestIdFilter.hasPatterns()` / `isEmpty()` in the component and 
guard on that instead of re-implementing the blank check here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to