You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/11/16 22:22:57 UTC

[GitHub] [camel] davsclaus commented on a diff in pull request #8717: Camel 18719 : camel-jbang - Adding the dependency of camel-quarkus-core creates two entries in exported POM.xml

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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org