mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
isEmptyOrSpaces accepts CharSequence +review
This commit is contained in:
@@ -968,8 +968,14 @@ public class StringUtil extends StringUtilRt {
|
||||
}
|
||||
|
||||
@Contract("null -> true")
|
||||
public static boolean isEmptyOrSpaces(@Nullable final String s) {
|
||||
if (s == null || s.isEmpty()) {
|
||||
// we need to keep this method to preserve backward compatibility
|
||||
public static boolean isEmptyOrSpaces(@Nullable String s) {
|
||||
return isEmptyOrSpaces(((CharSequence)s));
|
||||
}
|
||||
|
||||
@Contract("null -> true")
|
||||
public static boolean isEmptyOrSpaces(@Nullable CharSequence s) {
|
||||
if (isEmpty(s)) {
|
||||
return true;
|
||||
}
|
||||
for (int i = 0; i < s.length(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user