Skip to content

Commit 915fc2e

Browse files
committed
Merge pull request #42192 from arefbehboudi
* pr/42192: Polish contribution Polish Closes gh-42192
2 parents 24040e2 + ece5c6f commit 915fc2e

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json/JsonValueWriter.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,9 @@ else if (ObjectUtils.isArray(value)) {
103103
else if (value instanceof Map<?, ?> map) {
104104
writeObject(map::forEach);
105105
}
106-
else if (value instanceof Number) {
106+
else if (value instanceof Number || value instanceof Boolean) {
107107
append(value.toString());
108108
}
109-
else if (value instanceof Boolean) {
110-
append(Boolean.TRUE.equals(value) ? "true" : "false");
111-
}
112109
else {
113110
writeString(value);
114111
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ protected void loadConfiguration(LoggingInitializationContext initializationCont
238238

239239
private void load(LoggingInitializationContext initializationContext, String location, LogFile logFile) {
240240
List<String> overrides = getOverrides(initializationContext);
241-
if (initializationContext != null) {
242-
applySystemProperties(initializationContext.getEnvironment(), logFile);
243-
}
241+
applySystemProperties(initializationContext.getEnvironment(), logFile);
244242
loadConfiguration(location, logFile, overrides);
245243
}
246244

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,8 +29,8 @@
2929
/**
3030
* {@link ApplicationContext} backed {@link ServerWebExchangeMatcher}. Can work directly
3131
* with the {@link ApplicationContext}, obtain an existing bean or
32-
* {@link AutowireCapableBeanFactory#createBean(Class, int, boolean) create a new bean}
33-
* that is autowired in the usual way.
32+
* {@link AutowireCapableBeanFactory#createBean(Class) create a new bean} that is
33+
* autowired in the usual way.
3434
*
3535
* @param <C> the type of the context that the match method actually needs to use. Can be
3636
* an {@link ApplicationContext} or a class of an {@link ApplicationContext#getBean(Class)

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/servlet/ApplicationContextRequestMatcher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,8 +30,8 @@
3030
/**
3131
* {@link ApplicationContext} backed {@link RequestMatcher}. Can work directly with the
3232
* {@link ApplicationContext}, obtain an existing bean or
33-
* {@link AutowireCapableBeanFactory#createBean(Class, int, boolean) create a new bean}
34-
* that is autowired in the usual way.
33+
* {@link AutowireCapableBeanFactory#createBean(Class) create a new bean} that is
34+
* autowired in the usual way.
3535
*
3636
* @param <C> the type of the context that the match method actually needs to use. Can be
3737
* an {@link ApplicationContext} or a class of an {@link ApplicationContext#getBean(Class)

0 commit comments

Comments
 (0)