This is an automated email from the ASF dual-hosted git repository.
orpiske 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 6efba394f06 (chores) camel-core-model: fold method reference
6efba394f06 is described below
commit 6efba394f0604d85b5df9216819d229d3123ea69
Author: Otavio R. Piske <[email protected]>
AuthorDate: Sat Sep 23 17:27:32 2023 +0200
(chores) camel-core-model: fold method reference
This should avoid an unnecessary object allocation
Signed-off-by: Otavio R. Piske <[email protected]>
---
.../src/main/java/org/apache/camel/builder/PredicateClause.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/builder/PredicateClause.java
b/core/camel-core-model/src/main/java/org/apache/camel/builder/PredicateClause.java
index eac2775e361..01b2aace9fa 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/builder/PredicateClause.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/builder/PredicateClause.java
@@ -45,7 +45,7 @@ public class PredicateClause<T> implements
org.apache.camel.Predicate {
* Define a {@link org.apache.camel.Predicate} which targets the Exchange.
*/
public T exchange(final Predicate<Exchange> predicate) {
- this.predicate = predicate::test;
+ this.predicate = predicate;
return parent;
}