Skip to content

Commit 7a8d66e

Browse files
committed
fix: Test failures
Signed-off-by: Piotr P. Karwasz <[email protected]>
1 parent ea7a3d3 commit 7a8d66e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private boolean isLog4jLogManagerInstalled() {
185185
}
186186

187187
private boolean isLog4jBridgeHandlerAvailable() {
188-
return isClassAvailable(Log4J2RuntimeHints.LOG4J_BRIDGE_HANDLER);
188+
return ClassUtils.isPresent(Log4J2RuntimeHints.LOG4J_BRIDGE_HANDLER, getClassLoader());
189189
}
190190

191191
private void removeLog4jBridgeHandler() {

core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,15 @@ void configLocationsWithJacksonDatabind() {
309309

310310
@Test
311311
void configLocationsWithJacksonDataformatYaml() {
312-
this.loggingSystem.availableClasses("com.fasterxml.jackson.dataformat.yaml.YAMLParser");
312+
this.loggingSystem.availableClasses("com.fasterxml.jackson.dataformat.yaml.YAMLMapper");
313313
assertThat(this.loggingSystem.getStandardConfigLocations()).containsExactly("log4j2-test.properties",
314314
"log4j2-test.yaml", "log4j2-test.yml", "log4j2-test.xml", "log4j2.properties", "log4j2.yaml",
315315
"log4j2.yml", "log4j2.xml");
316316
}
317317

318318
@Test
319319
void configLocationsWithJacksonDatabindAndDataformatYaml() {
320-
this.loggingSystem.availableClasses("com.fasterxml.jackson.dataformat.yaml.YAMLParser",
320+
this.loggingSystem.availableClasses("com.fasterxml.jackson.dataformat.yaml.YAMLMapper",
321321
ObjectMapper.class.getName());
322322
assertThat(this.loggingSystem.getStandardConfigLocations()).containsExactly("log4j2-test.properties",
323323
"log4j2-test.yaml", "log4j2-test.yml", "log4j2-test.json", "log4j2-test.jsn", "log4j2-test.xml",

0 commit comments

Comments
 (0)