Skip to content

Polish #42268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Polish #42268

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ public void printBanner(Environment environment, Class<?> sourceClass, PrintStre
printStream.println();
printStream.println(BANNER);
String version = String.format(" (v%s)", SpringBootVersion.getVersion());
StringBuilder padding = new StringBuilder();
while (padding.length() < STRAP_LINE_SIZE - (version.length() + SPRING_BOOT.length())) {
padding.append(" ");
}
printStream.println(AnsiOutput.toString(AnsiColor.GREEN, SPRING_BOOT, AnsiColor.DEFAULT, padding.toString(),
String padding = " ".repeat(Math.max(0, STRAP_LINE_SIZE - (version.length() + SPRING_BOOT.length())));
printStream.println(AnsiOutput.toString(AnsiColor.GREEN, SPRING_BOOT, AnsiColor.DEFAULT, padding,
AnsiStyle.FAINT, version));
printStream.println();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public void onApplicationEvent(ContextRefreshedEvent event) {
/**
* {@link ApplicationEvent} fired when a parent context is available.
*/
@SuppressWarnings("serial")
public static class ParentContextAvailableEvent extends ApplicationEvent {

public ParentContextAvailableEvent(ConfigurableApplicationContext applicationContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ else if (value instanceof Collection<?> collection) {
else if (value instanceof String) {
properties.put(name, value);
}
else if (value instanceof Number) {
properties.put(name, value.toString());
}
else if (value instanceof Boolean) {
else if (value instanceof Number || value instanceof Boolean) {
properties.put(name, value.toString());
}
else {
Expand Down
Loading