You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/camel-csimple-joor/src/test/java/org/apache/camel/language/csimple/joor/OriginalSimpleOperatorTest.java
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ public class OriginalSimpleOperatorTest extends LanguageTestSupport {
34
34
publicvoidtestValueWithSpace() {
35
35
exchange.getIn().setBody("Hello Big World");
36
36
assertPredicate("${in.body} == 'Hello Big World'", true);
37
+
assertPredicate("${in.body} == ${body}", true);
37
38
}
38
39
39
40
@Test
@@ -805,6 +806,38 @@ public void testNotEndsWith() {
Copy file name to clipboardExpand all lines: core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,6 +336,22 @@ And the following unary operators can be used:
336
336
|`--` | To decrement a number by one. The left-hand side must be a function, otherwise parsed as literal.
337
337
|====
338
338
339
+
And the following other operators can be used:
340
+
341
+
[width="100%",cols="50%,50%",options="header",]
342
+
|====
343
+
|Operator |Description
344
+
|`?:` | The elvis operator returns the left-hand side if it has an effective Boolean value of true, otherwise it returns the right-hand side. This is useful for providing fallback values when an expression may evaluate to a value with an effective Boolean value of false (such as `null`, `false`, `0`, empty/blank string).
345
+
|====
346
+
347
+
For example the following elvis operator will return the username header unless its null or empty, which
0 commit comments