Skip to content

Commit

Permalink
BLADE-743 liferay-blade-cli: StringUtil: fixes NPE - allows null strings
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbrokke committed Apr 5, 2024
1 parent a9dfcca commit ea8883a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cli/src/main/java/com/liferay/blade/cli/util/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ public static boolean equals(String s1, Object o) {
}

public static boolean isNullOrEmpty(String arg) {
boolean hasContent = Optional.of(
boolean hasContent = Optional.ofNullable(
arg
).filter(
s -> s != null
).map(
String::trim
).filter(
Expand Down

0 comments on commit ea8883a

Please sign in to comment.