Skip to content

Commit 47e8f61

Browse files
committed
Polish "Fix error mark position for PatternParseException"
See gh-38944
1 parent fccce54 commit 47e8f61

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,11 @@ class PatternParseFailureAnalyzerTests {
3636
@Test
3737
void patternParseFailureQuotesPattern() {
3838
FailureAnalysis failureAnalysis = performAnalysis("/spring/**/framework");
39-
assertThat(failureAnalysis.getDescription()).contains("""
40-
Invalid mapping pattern detected:
41-
/spring/**/framework
42-
^
43-
""");
39+
assertThat(failureAnalysis.getDescription())
40+
.contains("Invalid mapping pattern detected:\n" + "/spring/**/framework\n" + " ^");
4441
assertThat(failureAnalysis.getAction())
45-
.contains("Fix this pattern in your application or switch to the legacy parser"
46-
+ " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.");
42+
.contains("Fix this pattern in your application or switch to the legacy parser"
43+
+ " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.");
4744
}
4845

4946
private FailureAnalysis performAnalysis(String pattern) {

0 commit comments

Comments
 (0)