[
https://issues.apache.org/jira/browse/CAMEL-11532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16265113#comment-16265113
]
ASF GitHub Bot commented on CAMEL-11532:
----------------------------------------
lburgazzoli commented on a change in pull request #2098: CAMEL-11532 Java DSL
enhancement to accept supplier and function arguments
URL: https://github.com/apache/camel/pull/2098#discussion_r152932147
##########
File path:
camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
##########
@@ -3051,6 +3052,42 @@ public Type setBody(Expression expression) {
return (Type) this;
}
+ /**
+ * <a href="http://camel.apache.org/message-translator.html">Message
Translator EIP:</a>
+ * Adds a processor which sets the body on the IN message
+ *
+ * @param supplier the supplier that provides a value to the IN message
body
+ * @return the builder
+ */
+ public Type setBody(Supplier supplier) {
Review comment:
I guess a generic is missing here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> java 8 dsl : allow to set the body using a supplier
> ----------------------------------------------------
>
> Key: CAMEL-11532
> URL: https://issues.apache.org/jira/browse/CAMEL-11532
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Luca Burgazzoli
> Assignee: Luca Burgazzoli
> Priority: Minor
> Fix For: 2.21.0
>
>
> Example:
> {code:java}
> from("timer")
> .setBody(User::new);
> from("timer")
> .trasform()
> .body(User::new);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)