From b4696ac036c913377878a704fe5365e4a246b1c4 Mon Sep 17 00:00:00 2001 From: onewe Date: Wed, 10 Aug 2022 14:19:57 +0800 Subject: [PATCH] [ISSUE #8925] fix that the value of hasQueryString is always false Close #8925 --- .../alibaba/nacos/client/config/impl/ServerListManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java index 85149fea636..760516eab23 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java @@ -254,8 +254,8 @@ private void initAddressServerUrl(Properties properties) { ContextPathUtil.normalizeContextPath(this.contentPath), this.serverListName)); boolean hasQueryString = false; if (StringUtils.isNotBlank(namespace)) { - addressServerUrlTem.append("?namespace=" + namespace); - hasQueryString = false; + addressServerUrlTem.append("?namespace=").append(namespace); + hasQueryString = true; } if (properties != null && properties.containsKey(PropertyKeyConst.ENDPOINT_QUERY_PARAMS)) { addressServerUrlTem