This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot-examples.git
The following commit(s) were added to refs/heads/camel-3.x by this push:
new 0fcaa3b CAMEL-19510: reactive-streams - Fix the simple expression
(#112)
0fcaa3b is described below
commit 0fcaa3b768ac2e24538db997a21aa6196483d094
Author: Nicolas Filotto <[email protected]>
AuthorDate: Tue Jun 27 17:43:01 2023 +0200
CAMEL-19510: reactive-streams - Fix the simple expression (#112)
## Motivation
The rest endpoint defined in RestExample fails with an error of type
`java.lang.ClassCastException: class java.lang.String cannot be cast to class
java.lang.Long`
## Modifications:
* Fixes the simple expression
---
.../java/org/apache/camel/example/reactive/streams/RestExample.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/RestExample.java
b/reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/RestExample.java
index 4f6dc0c..ebd72e6 100644
---
a/reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/RestExample.java
+++
b/reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/RestExample.java
@@ -70,8 +70,8 @@ public class RestExample {
.to("direct:sum");
from("direct:sum")
- .setHeader("num1").simple("headerAs(num1,Long)")
- .setHeader("num2").simple("headerAs(num2,Long)")
+ .setHeader("num1").simple("${headerAs(num1,Long)}")
+ .setHeader("num2").simple("${headerAs(num2,Long)}")
.bean("calculator", "sum")
.process(new UnwrapStreamProcessor())
.setBody().simple("The result is: ${body}");