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 2023/10/10 13:58:32 UTC
[camel] branch camel-3.x updated: CAMEL-19970 - Avoid IllegalArgumentException for file without (#11684)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.x by this push:
new 70402190986 CAMEL-19970 - Avoid IllegalArgumentException for file without (#11684)
70402190986 is described below
commit 70402190986dab6b0e92bef766be9832da4ac138
Author: Aurélien Pupier <ap...@redhat.com>
AuthorDate: Tue Oct 10 15:58:22 2023 +0200
CAMEL-19970 - Avoid IllegalArgumentException for file without (#11684)
extension in same folder
when using JBang and that we let auto-detect routes, the files without
extensions were added as potential routes and, as expected, no
RouteLoader were found. An IllegalArgumentExeption was thrown at this
time.
Signed-off-by: Aurélien Pupier <ap...@redhat.com>
---
.../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
index 1416a30c107..0c08f803ecc 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
@@ -1038,6 +1038,10 @@ public class Run extends CamelCommand {
if (f.exists() && f.isDirectory()) {
return true;
}
+
+ if (FileUtil.onlyExt(name) == null) {
+ return true;
+ }
String on = FileUtil.onlyName(name, true);
on = on.toLowerCase(Locale.ROOT);