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 2022/05/06 13:18:20 UTC
[camel] branch main updated: camel-jbang - Fix bind
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new fd5f12ec632 camel-jbang - Fix bind
fd5f12ec632 is described below
commit fd5f12ec632d326f4e37c891da565bfd5aadf8cf
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri May 6 15:18:04 2022 +0200
camel-jbang - Fix bind
---
.../main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java
index 0d327911c11..e969d3122cb 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java
@@ -18,6 +18,7 @@ package org.apache.camel.dsl.jbang.core.commands;
import java.io.FileOutputStream;
import java.io.InputStream;
+import java.net.URL;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.Callable;
@@ -107,10 +108,9 @@ class Bind implements Callable<Integer> {
} else {
res = new GitHubResourceResolver().resolve(
"github:apache:camel-kamelets:main:kamelets/" + kamelet + ".kamelet.yaml");
- if (res.exists()) {
- is = res.getInputStream();
- loc = res.getLocation();
- }
+ loc = res.getLocation();
+ URL u = new URL(loc);
+ is = u.openStream();
}
if (is != null) {
try {