Skip to content

Commit b39b990

Browse files
dreis2211snicoll
authored andcommitted
Use isEmpty() where possible
Closes gh-16225
1 parent 223f2be commit b39b990

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleKeyEntry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class SingleKeyEntry extends AbstractConfigurationEntry {
5757
public void writeAsciidoc(StringBuilder builder) {
5858
builder.append("|`+").append(this.key).append("+`").append(NEWLINE);
5959
String defaultValue = processDefaultValue();
60-
if (defaultValue.length() > 0) {
60+
if (!defaultValue.isEmpty()) {
6161
builder.append("|`+").append(defaultValue).append("+`").append(NEWLINE);
6262
}
6363
else {
@@ -73,7 +73,7 @@ public void writeAsciidoc(StringBuilder builder) {
7373
}
7474

7575
private String processDefaultValue() {
76-
if (this.defaultValue != null && this.defaultValue.length() > 0) {
76+
if (this.defaultValue != null && !this.defaultValue.isEmpty()) {
7777
return this.defaultValue.replace("\\", "\\\\").replace("|",
7878
"{vbar}" + NEWLINE);
7979
}

0 commit comments

Comments
 (0)