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/09 08:41:51 UTC

[GitHub] [dubbo] wangchengming666 opened a new pull request #8747: [3.0] String judge optimization

wangchengming666 opened a new pull request #8747:
URL: https://github.com/apache/dubbo/pull/8747


   string judge optimization
   
   `StringUtils.isEmpty(xxx)`substitute for `xxx == null` 


-- 
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


[GitHub] [dubbo] AlbumenJ merged pull request #8747: [3.0] String judge optimization

Posted by GitBox <gi...@apache.org>.
AlbumenJ merged pull request #8747:
URL: https://github.com/apache/dubbo/pull/8747


   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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