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 1092b548ba1 CAMEL-20392: camel-jq - Inclined jq in simple language 
should keep quotes (#13021)
1092b548ba1 is described below

commit 1092b548ba1a1771863c74116de645784840a0b2
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Feb 6 13:21:27 2024 +0100

    CAMEL-20392: camel-jq - Inclined jq in simple language should keep quotes 
(#13021)
---
 .../camel/language/simple/ast/SimpleFunctionExpression.java       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
 
b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
index 89ca1043278..0ba3b65788a 100644
--- 
a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
+++ 
b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
@@ -182,7 +182,7 @@ public class SimpleFunctionExpression extends 
LiteralExpression {
             if (exp == null) {
                 throw new SimpleParserException("Valid syntax: ${pretty(exp)} 
was: " + function, token.getIndex());
             }
-            exp = StringHelper.removeQuotes(exp);
+            exp = StringHelper.removeLeadingAndEndingQuotes(exp);
             Expression inlined = 
camelContext.resolveLanguage("simple").createExpression(exp);
             return ExpressionBuilder.prettyExpression(inlined);
         }
@@ -533,7 +533,7 @@ public class SimpleFunctionExpression extends 
LiteralExpression {
             if (exp == null) {
                 throw new SimpleParserException("Valid syntax: ${jq(exp)} was: 
" + function, token.getIndex());
             }
-            exp = StringHelper.removeQuotes(exp);
+            exp = StringHelper.removeLeadingAndEndingQuotes(exp);
             if (exp.startsWith("header:") || exp.startsWith("property:") || 
exp.startsWith("exchangeProperty:")
                     || exp.startsWith("variable:")) {
                 String input = StringHelper.before(exp, ",");
@@ -549,7 +549,7 @@ public class SimpleFunctionExpression extends 
LiteralExpression {
             if (exp == null) {
                 throw new SimpleParserException("Valid syntax: 
${jsonpath(exp)} was: " + function, token.getIndex());
             }
-            exp = StringHelper.removeQuotes(exp);
+            exp = StringHelper.removeLeadingAndEndingQuotes(exp);
             if (exp.startsWith("header:") || exp.startsWith("property:") || 
exp.startsWith("exchangeProperty:")
                     || exp.startsWith("variable:")) {
                 String input = StringHelper.before(exp, ",");
@@ -564,7 +564,7 @@ public class SimpleFunctionExpression extends 
LiteralExpression {
             if (exp == null) {
                 throw new SimpleParserException("Valid syntax: ${xpath(exp)} 
was: " + function, token.getIndex());
             }
-            exp = StringHelper.removeQuotes(exp);
+            exp = StringHelper.removeLeadingAndEndingQuotes(exp);
             if (exp.startsWith("header:") || exp.startsWith("property:") || 
exp.startsWith("exchangeProperty:")
                     || exp.startsWith("variable:")) {
                 String input = StringHelper.before(exp, ",");

Reply via email to