Skip to content

Commit

Permalink
Treat empty string as null
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Oct 26, 2019
1 parent abd167f commit c799538
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public boolean getPropertyAsBoolean(final String name, final boolean defaultValu
return Optional.ofNullable(SYSTEM_PROPERTY_UTILS.getProperty(name))
.map(String::toLowerCase)
.map(String::trim)
.filter(StringUtils::isNotBlank)
.map(Boolean::parseBoolean)
.orElse(defaultValue);
}
Expand Down

0 comments on commit c799538

Please sign in to comment.