You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/03/20 14:45:16 UTC

[GitHub] JackLee1993 commented on a change in pull request #1475: update StringUtils isBlank and add isNotBlank method

JackLee1993 commented on a change in pull request #1475: update StringUtils isBlank and add isNotBlank method
URL: https://github.com/apache/incubator-dubbo/pull/1475#discussion_r175792671
 
 

 ##########
 File path: dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/StringUtils.java
 ##########
 @@ -48,9 +48,18 @@ private StringUtils() {
     }
 
     public static boolean isBlank(String str) {
-        if (str == null || str.length() == 0)
-            return true;
-        return false;
+        if (isEmpty(str)) return true;
+
+        for (int i = 0; i < str.length(); i++) {
 
 Review comment:
   嗯,这块语义是我搞错了,之前这块的功能是可以的。我这块提交参考了apache和spring的实现,可能更好一点。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services