gtully commented on code in PR #4820:
URL: https://github.com/apache/activemq-artemis/pull/4820#discussion_r1519556299


##########
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataImporter.java:
##########
@@ -337,17 +337,27 @@ private void sendMessage(List<String> queues, Message 
message) throws Exception
                   logger.debug("Requesting ID for: {}", queue);
                }
                ClientMessage reply = requestor.request(managementMessage);
-               Number idObject = (Number) ManagementHelper.getResult(reply);
-               queueID = idObject.longValue();
+               if (ManagementHelper.hasOperationSucceeded(reply)) {
+                  Number idObject = (Number) ManagementHelper.getResult(reply);
+                  queueID = idObject.longValue();
+               } else {
+                  if (debugLog) {
+                     logger.debug("Failed to get ID for {} is: {}", queue, 
ManagementHelper.getResult(reply, String.class));
+                  }

Review Comment:
   good catch, thanks. will fix.



-- 
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: gitbox-unsubscr...@activemq.apache.org

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

Reply via email to