You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/04 10:50:31 UTC

[GitHub] [pulsar] BewareMyPower commented on a change in pull request #14117: Remove Persistent Topics v3 API - use custom media type instead

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: commits-unsubscribe@pulsar.apache.org

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