a-mazurok commented on code in PR #11838:
URL: https://github.com/apache/camel/pull/11838#discussion_r1372043405


##########
components/camel-azure/camel-azure-servicebus/src/main/java/org/apache/camel/component/azure/servicebus/ServiceBusProducer.java:
##########
@@ -147,12 +147,12 @@ private BiConsumer<Exchange, AsyncCallback> 
sendMessages() {
 
             Mono<Void> sendMessageAsync;
 
-            if (exchange.getMessage().getBody() instanceof Iterable) {
+            if (exchange.getMessage().getBody() instanceof Iterable<?>) {
                 sendMessageAsync
-                        = 
serviceBusSenderOperations.sendMessages(convertBodyToList((Iterable<Object>) 
inputBody),
+                        = 
serviceBusSenderOperations.sendMessages(convertBodyToList((Iterable<?>) 
inputBody),
                                 
configurationOptionsProxy.getServiceBusTransactionContext(exchange), 
applicationProperties);
             } else {
-                sendMessageAsync = 
serviceBusSenderOperations.sendMessages(exchange.getMessage().getBody(String.class),
+                sendMessageAsync = 
serviceBusSenderOperations.sendMessages(inputBody,

Review Comment:
   In case of other Java types `ServiceBusUtils` will throw 
`IllegalArgumentException("Make sure your message data is in String, byte[] or 
BinaryData")`(not changed that).



-- 
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