remove useless else block
@@ -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)) {
