diff --git a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java index d860a9239d1fd..0dc5a361c2114 100644 --- a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java +++ b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java @@ -2123,7 +2123,7 @@ public void init(CamelContext context) { expression.init(context); if (expression instanceof ConstantExpressionAdapter constantExpressionAdapter) { Object value = constantExpressionAdapter.getValue(); - preprocessedExpression.add(value.toString()); + preprocessedExpression.add(String.valueOf(value)); } else { preprocessedExpression.add(expression); constantsOnly = false;