Skip to content

Commit ebb6c99

Browse files
committed
Merge pull request #42268 from arefbehboudi
* pr/42268: Polish Closes gh-42268
2 parents 2bfd784 + bf1ef30 commit ebb6c99

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,8 @@ public void printBanner(Environment environment, Class<?> sourceClass, PrintStre
4848
printStream.println();
4949
printStream.println(BANNER);
5050
String version = String.format(" (v%s)", SpringBootVersion.getVersion());
51-
StringBuilder padding = new StringBuilder();
52-
while (padding.length() < STRAP_LINE_SIZE - (version.length() + SPRING_BOOT.length())) {
53-
padding.append(" ");
54-
}
55-
printStream.println(AnsiOutput.toString(AnsiColor.GREEN, SPRING_BOOT, AnsiColor.DEFAULT, padding.toString(),
51+
String padding = " ".repeat(Math.max(0, STRAP_LINE_SIZE - (version.length() + SPRING_BOOT.length())));
52+
printStream.println(AnsiOutput.toString(AnsiColor.GREEN, SPRING_BOOT, AnsiColor.DEFAULT, padding,
5653
AnsiStyle.FAINT, version));
5754
printStream.println();
5855
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/ParentContextApplicationContextInitializer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public void onApplicationEvent(ContextRefreshedEvent event) {
8383
/**
8484
* {@link ApplicationEvent} fired when a parent context is available.
8585
*/
86-
@SuppressWarnings("serial")
8786
public static class ParentContextAvailableEvent extends ApplicationEvent {
8887

8988
public ParentContextAvailableEvent(ConfigurableApplicationContext applicationContext) {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudFoundryVcapEnvironmentPostProcessor.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,7 @@ else if (value instanceof Collection<?> collection) {
213213
else if (value instanceof String) {
214214
properties.put(name, value);
215215
}
216-
else if (value instanceof Number) {
217-
properties.put(name, value.toString());
218-
}
219-
else if (value instanceof Boolean) {
216+
else if (value instanceof Number || value instanceof Boolean) {
220217
properties.put(name, value.toString());
221218
}
222219
else {

0 commit comments

Comments
 (0)