implemented isNotXxx methods as !isXxx calls to simplify and ensure symmetry
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@345907 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
47cb8ddccd
commit
03174f6358
|
@ -212,7 +212,7 @@ public class StringUtils {
|
|||
* @return <code>true</code> if the String is not empty and not null
|
||||
*/
|
||||
public static boolean isNotEmpty(String str) {
|
||||
return str != null && str.length() > 0;
|
||||
return !StringUtils.isEmpty(str);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -260,16 +260,7 @@ public class StringUtils {
|
|||
* @since 2.0
|
||||
*/
|
||||
public static boolean isNotBlank(String str) {
|
||||
int strLen;
|
||||
if (str == null || (strLen = str.length()) == 0) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < strLen; i++) {
|
||||
if ((Character.isWhitespace(str.charAt(i)) == false)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return !StringUtils.isBlank(str);
|
||||
}
|
||||
|
||||
// Trim
|
||||
|
|
Loading…
Reference in New Issue