davsclaus commented on code in PR #8717: URL: https://github.com/apache/camel/pull/8717#discussion_r1024565087
########## dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java: ########## @@ -342,6 +342,7 @@ private int run() throws Exception { if (dep == null) { dep = dependencies; } else if (dependencies != null && !dependencies.equals(dep)) { + dep = dep.substring(0, dep.lastIndexOf(",")); Review Comment: What if there is no comma in dep, then indexOf returns -1 and substring will fail. I think we need to check if dep ends with comma we can avoid adding the comma -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org