Commit b39b990a authored by dreis2211's avatar dreis2211 Committed by Stephane Nicoll

Use isEmpty() where possible

Closes gh-16225
parent 223f2be7
......@@ -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 {
......@@ -73,7 +73,7 @@ class SingleKeyEntry extends AbstractConfigurationEntry {
}
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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment