You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by al...@apache.org on 2022/09/06 02:26:37 UTC

[pulsar] branch master updated: remove useless else block (#17122)

This is an automated email from the ASF dual-hosted git repository.

aloyszhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new f4a826008ec remove useless else block (#17122)
f4a826008ec is described below

commit f4a826008ec8d306b9f86bf70241fca2967b873c
Author: AloysZhang <lo...@gmail.com>
AuthorDate: Tue Sep 6 10:26:30 2022 +0800

    remove useless else block (#17122)
---
 .../java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java
index 152cc1c5df0..b5d22f36d87 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java
@@ -136,14 +136,13 @@ public class ProxyServiceStarter {
             // load config file
             config = PulsarConfigurationLoader.create(configFile, ProxyConfiguration.class);
 
+            if (!isBlank(zookeeperServers)) {
+                // Use zookeeperServers from command line
+                config.setMetadataStoreUrl(zookeeperServers);
+            }
             if (!isBlank(metadataStoreUrl)) {
                 // Use metadataStoreUrl from command line
                 config.setMetadataStoreUrl(metadataStoreUrl);
-            } else if (!isBlank(zookeeperServers)){
-                // Use zookeeperServers from command line if metadataStoreUrl is empty;
-                config.setMetadataStoreUrl(zookeeperServers);
-            } else {
-                // use "metadataStoreUrl" property in "proxy.conf".
             }
 
             if (!isBlank(globalZookeeperServers)) {