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/09 07:10:23 UTC

[camel] branch main updated (c1aeb14875e -> a6a3ca6d1ab)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from c1aeb14875e Sync deps
     new b3272482f1d CAMEL-18080: camel-jbang - Run from clipboard
     new a6a3ca6d1ab CAMEL-18076: camel-core - Optimize ExchangeHelper getDefaultCharsetName

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/camel/support/ExchangeHelper.java        | 4 +++-
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java   | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)


[camel] 01/02: CAMEL-18080: camel-jbang - Run from clipboard

Posted by da...@apache.org.
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

commit b3272482f1d9c2fe6d48d645ba1448ef1206d4fc
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon May 9 07:00:56 2022 +0200

    CAMEL-18080: camel-jbang - Run from clipboard
---
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 6b3bb801cc6..15de0f5f23e 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
@@ -386,8 +386,8 @@ class Run implements Callable<Integer> {
         if (files != null) {
             for (String file : files) {
 
-                if (file.startsWith("clipboard")) {
-                    // run from clipboard
+                if (file.startsWith("clipboard") && !(new File(file).exists())) {
+                    // run from clipboard (not real file exists)
                     String ext = FileUtil.onlyExt(file, true);
                     if (ext == null || ext.isEmpty()) {
                         throw new IllegalArgumentException(


[camel] 02/02: CAMEL-18076: camel-core - Optimize ExchangeHelper getDefaultCharsetName

Posted by da...@apache.org.
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

commit a6a3ca6d1ab017635562d26fe4151ee9c8774ca4
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon May 9 09:09:41 2022 +0200

    CAMEL-18076: camel-core - Optimize ExchangeHelper getDefaultCharsetName
---
 .../src/main/java/org/apache/camel/support/ExchangeHelper.java        | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java b/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
index 89c1c7620a7..95e711abd92 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
@@ -65,6 +65,8 @@ import org.slf4j.Logger;
 @EagerClassloaded
 public final class ExchangeHelper {
 
+    private static String defaultCharset = ObjectHelper.getSystemProperty(Exchange.DEFAULT_CHARSET_PROPERTY, "UTF-8");
+
     /**
      * Utility classes should not have a public constructor.
      */
@@ -964,7 +966,7 @@ public final class ExchangeHelper {
     }
 
     private static String getDefaultCharsetName() {
-        return ObjectHelper.getSystemProperty(Exchange.DEFAULT_CHARSET_PROPERTY, "UTF-8");
+        return defaultCharset;
     }
 
     /**