Skip to content

Commit eed6e19

Browse files
committed
Polish "Detect logback config location as xml if path ends with .xml"
See gh-37039
1 parent c9cc1da commit eed6e19

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ void whenConfigurationErrorIsDetectedUnderlyingCausesAreIncludedAsSuppressedExce
691691
void whenConfigLocationIsNotXmlThenIllegalArgumentExceptionShouldBeThrown() {
692692
this.loggingSystem.beforeInitialize();
693693
assertThatIllegalStateException()
694-
.isThrownBy(() -> initialize(this.initializationContext, "file:///logback-nonexistent.txt",
694+
.isThrownBy(() -> initialize(this.initializationContext, "classpath:logback-invalid-format.txt",
695695
getLogFile(tmpDir() + "/tmp.log", null)))
696696
.satisfies((ex) -> assertThat(ex.getCause()).isInstanceOf(IllegalArgumentException.class)
697697
.hasMessageStartingWith("Unsupported file extension"));

spring-boot-project/spring-boot/src/test/resources/logback-invalid-format.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)