mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge pull request #16225 from dreis2211
* pr/16225: Use isEmpty() where possible
This commit is contained in:
commit
c4b8328a2b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user