Skip to content

Commit

Permalink
Use isEmpty() where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
dreis2211 authored and snicoll committed Mar 14, 2019
1 parent 223f2be commit b39b990
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SingleKeyEntry extends AbstractConfigurationEntry {
public void writeAsciidoc(StringBuilder builder) {
builder.append("|`+").append(this.key).append("+`").append(NEWLINE);
String defaultValue = processDefaultValue();
if (defaultValue.length() > 0) {
if (!defaultValue.isEmpty()) {
builder.append("|`+").append(defaultValue).append("+`").append(NEWLINE);
}
else {
Expand All @@ -73,7 +73,7 @@ public void writeAsciidoc(StringBuilder builder) {
}

private String processDefaultValue() {
if (this.defaultValue != null && this.defaultValue.length() > 0) {
if (this.defaultValue != null && !this.defaultValue.isEmpty()) {
return this.defaultValue.replace("\\", "\\\\").replace("|",
"{vbar}" + NEWLINE);
}
Expand Down

0 comments on commit b39b990

Please sign in to comment.