Skip to content

Commit 70eb941

Browse files
committed
Merge branch '3.2.x'
Closes gh-39076
2 parents eda2261 + 748a80c commit 70eb941

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/PatternParseFailureAnalyzer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class PatternParseFailureAnalyzer extends AbstractFailureAnalyzer<PatternParseEx
3030

3131
@Override
3232
protected FailureAnalysis analyze(Throwable rootFailure, PatternParseException cause) {
33-
return new FailureAnalysis("Invalid mapping pattern detected: " + cause.toDetailedString(),
33+
return new FailureAnalysis("Invalid mapping pattern detected:\n" + cause.toDetailedString(),
3434
"Fix this pattern in your application or switch to the legacy parser implementation with "
3535
+ "'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.",
3636
cause);

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/PatternParseFailureAnalyzerTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class PatternParseFailureAnalyzerTests {
3636
@Test
3737
void patternParseFailureQuotesPattern() {
3838
FailureAnalysis failureAnalysis = performAnalysis("/spring/**/framework");
39-
assertThat(failureAnalysis.getDescription()).contains("Invalid mapping pattern detected: /spring/**/framework");
39+
assertThat(failureAnalysis.getDescription())
40+
.contains("Invalid mapping pattern detected:\n" + "/spring/**/framework\n" + " ^");
4041
assertThat(failureAnalysis.getAction())
4142
.contains("Fix this pattern in your application or switch to the legacy parser"
4243
+ " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.");

0 commit comments

Comments
 (0)