Skip to content

Commit 36e89f9

Browse files
committed
Merge pull request #14339 from dreis2211:polish-commandcompleter
* pr/14339: Polish CommandCompleter
2 parents 9b9a888 + 4fc2806 commit 36e89f9

File tree

1 file changed

+1
-6
lines changed
  • spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell

1 file changed

+1
-6
lines changed

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/CommandCompleter.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,7 @@ private static class OptionHelpLine {
127127
private final String usage;
128128

129129
OptionHelpLine(OptionHelp optionHelp) {
130-
StringBuilder options = new StringBuilder();
131-
for (String option : optionHelp.getOptions()) {
132-
options.append((options.length() != 0) ? ", " : "");
133-
options.append(option);
134-
}
135-
this.options = options.toString();
130+
this.options = String.join(", ", optionHelp.getOptions());
136131
this.usage = optionHelp.getUsageHelp();
137132
}
138133

0 commit comments

Comments
 (0)