Skip to content

Commit

Permalink
optimize: remove duplicated in string utils (apache#3186)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbxyyx committed Oct 14, 2020
1 parent 6c0c759 commit b80fa9f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions common/src/main/java/io/seata/common/util/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,7 @@ public static boolean isBlank(String str) {
* @return boolean boolean
*/
public static boolean isNotBlank(String str) {
int length;

if ((str == null) || ((length = str.length()) == 0)) {
return false;
}

for (int i = 0; i < length; i++) {
if (!Character.isWhitespace(str.charAt(i))) {
return true;
}
}
return false;
return !isBlank(str);
}

/**
Expand Down

0 comments on commit b80fa9f

Please sign in to comment.