davsclaus commented on code in PR #8023:
URL: https://github.com/apache/camel/pull/8023#discussion_r928747608


##########
components/camel-datasonnet/src/main/java/org/apache/camel/language/datasonnet/DatasonnetExpression.java:
##########
@@ -114,7 +114,11 @@ private Document<?> doEvaluate(Exchange exchange) {
         }
 
         Document<?> body;
-        if (exchange.getMessage().getBody() instanceof Document) {
+
+        if (exchange.getMessage().getBody() == null || 
"".equals(MessageHelper.extractBodyAsString(exchange.getMessage()))) {

Review Comment:
   This logic should be moved last as extracting body as string would then 
always be performed and that is not good



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to