You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/10 14:06:51 UTC

[GitHub] [dubbo] horizonzy commented on a change in pull request #8747: [3.0] String judge optimization

horizonzy commented on a change in pull request #8747:
URL: https://github.com/apache/dubbo/pull/8747#discussion_r706211467



##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/InstanceAddressURL.java
##########
@@ -149,30 +149,30 @@ public String getParameter(String key) {
             return getSide();
         }
 
-        if(consumerParamFirst(key)) {
+        if (consumerParamFirst(key)) {
             URL consumerUrl = RpcContext.getServiceContext().getConsumerUrl();
             if (consumerUrl != null) {
                 String v = consumerUrl.getParameter(key);
-                if (v != null) {
+                if (StringUtils.isNotEmpty(v)) {

Review comment:
       It seems the new logic is different from the origina. `"a":""` will get different result. I'm not sure this pr have changed the author's original intention. 
   @AlbumenJ plz help to review it




-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org