Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions jablib/src/main/java/org/jabref/model/strings/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -635,19 +635,18 @@ public static boolean isNullOrEmpty(String toTest) {
}

public static boolean isBlank(String string) {
return !isNotBlank(string);
return (string == null) || string.isBlank();
}

public static boolean isBlank(Optional<String> string) {
return !isNotBlank(string);
return string.isEmpty() || isBlank(string.get());
}

/**
* Checks if a CharSequence is not empty (""), not null and not whitespace only.
*/
public static boolean isNotBlank(String string) {
// No Guava equivalent existing
return StringUtils.isNotBlank(string);
return !isBlank(string);
}

public static boolean isNotBlank(Optional<String> string) {
Expand Down