diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json/JsonValueWriter.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json/JsonValueWriter.java index be0535f7a9a5..00194b550431 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json/JsonValueWriter.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json/JsonValueWriter.java @@ -103,12 +103,9 @@ else if (ObjectUtils.isArray(value)) { else if (value instanceof Map map) { writeObject(map::forEach); } - else if (value instanceof Number) { + else if (value instanceof Number || value instanceof Boolean) { append(value.toString()); } - else if (value instanceof Boolean) { - append(Boolean.TRUE.equals(value) ? "true" : "false"); - } else { writeString(value); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java index 21d4d47a3971..694c8f5cba40 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java @@ -238,9 +238,7 @@ protected void loadConfiguration(LoggingInitializationContext initializationCont private void load(LoggingInitializationContext initializationContext, String location, LogFile logFile) { List overrides = getOverrides(initializationContext); - if (initializationContext != null) { - applySystemProperties(initializationContext.getEnvironment(), logFile); - } + applySystemProperties(initializationContext.getEnvironment(), logFile); loadConfiguration(location, logFile, overrides); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java index 88ea38ca5614..11dda128d247 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java @@ -29,7 +29,7 @@ /** * {@link ApplicationContext} backed {@link ServerWebExchangeMatcher}. Can work directly * with the {@link ApplicationContext}, obtain an existing bean or - * {@link AutowireCapableBeanFactory#createBean(Class, int, boolean) create a new bean} + * {@link AutowireCapableBeanFactory#createBean(Class) create a new bean} * that is autowired in the usual way. * * @param the type of the context that the match method actually needs to use. Can be diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/servlet/ApplicationContextRequestMatcher.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/servlet/ApplicationContextRequestMatcher.java index 0f2d9e3858ec..d96253c707d7 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/servlet/ApplicationContextRequestMatcher.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/servlet/ApplicationContextRequestMatcher.java @@ -30,7 +30,7 @@ /** * {@link ApplicationContext} backed {@link RequestMatcher}. Can work directly with the * {@link ApplicationContext}, obtain an existing bean or - * {@link AutowireCapableBeanFactory#createBean(Class, int, boolean) create a new bean} + * {@link AutowireCapableBeanFactory#createBean(Class) create a new bean} * that is autowired in the usual way. * * @param the type of the context that the match method actually needs to use. Can be