Use isEmpty() where possible
Closes gh-16225
This commit is contained in:
committed by
Stephane Nicoll
parent
223f2be7d2
commit
b39b990a72
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user