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


##########
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:
   What if the input body is a Java class or somethig else. Does ASB know how 
to handle all kind of java objects ?



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