[ 
https://issues.apache.org/jira/browse/CAMEL-25959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131134#comment-18131134
 ] 

Claus Ibsen commented on CAMEL-25959:
-------------------------------------

Fixed in PR https://github.com/apache/camel/pull/28372

_Claude Code on behalf of davsclaus_

> camel-azure-storage-queue - sendMessage without a body fails with a 
> NullPointerException of the SDK
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25959
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25959
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-azure
>    Affects Versions: 4.18.0, 4.22.0, 4.23.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> sendMessage takes the text of the message with {{getBody(String.class)}} and 
> passes it to the SDK ({{QueueOperations.sendMessage}}, main e6885df7894d, 
> lines 90 and 95). Without a body the text is null, and the SDK fails with 
> {{NullPointerException: 'content' cannot be null.}} (from 
> {{BinaryData.fromString}}), instead of an error from Camel that says the 
> message has no body. Checked on 4.24.0-SNAPSHOT against Azurite ({{camel 
> infra run azure storage-queue}}).
> An empty text, on the other hand, is sent, and the consumer then gives no 
> body for it, as the SDK reads an empty message text as null.
> *Proposed change*: fail with an InvalidPayloadException 
> ({{getMandatoryBody(String.class)}}) when there is no body.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to