BewareMyPower commented on a change in pull request #14117:
URL: https://github.com/apache/pulsar/pull/14117#discussion_r799359121



##########
File path: 
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java
##########
@@ -514,8 +514,9 @@ void run() throws PulsarAdminException {
         @Override
         void run() throws Exception {
             String topic = validateTopicName(params);
-            Map<String, String> map = new HashMap<>();
-            if (metadata != null) {
+            Map<String, String> map = null;
+            if (metadata != null && !metadata.isEmpty()) {
+                map = new HashMap<>();

Review comment:
       Are the changes necessary? It looks like `map`, as the 3rd argument of 
`Topics#createPartitionedTopic`, is now `null` rather than an empty `HashMap` 
if `metadata` is empty.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to