Polish "Fix error mark position for PatternParseException"
See gh-38944
This commit is contained in:
parent
fccce54d52
commit
47e8f6168f
|
@ -36,14 +36,11 @@ class PatternParseFailureAnalyzerTests {
|
||||||
@Test
|
@Test
|
||||||
void patternParseFailureQuotesPattern() {
|
void patternParseFailureQuotesPattern() {
|
||||||
FailureAnalysis failureAnalysis = performAnalysis("/spring/**/framework");
|
FailureAnalysis failureAnalysis = performAnalysis("/spring/**/framework");
|
||||||
assertThat(failureAnalysis.getDescription()).contains("""
|
assertThat(failureAnalysis.getDescription())
|
||||||
Invalid mapping pattern detected:
|
.contains("Invalid mapping pattern detected:\n" + "/spring/**/framework\n" + " ^");
|
||||||
/spring/**/framework
|
|
||||||
^
|
|
||||||
""");
|
|
||||||
assertThat(failureAnalysis.getAction())
|
assertThat(failureAnalysis.getAction())
|
||||||
.contains("Fix this pattern in your application or switch to the legacy parser"
|
.contains("Fix this pattern in your application or switch to the legacy parser"
|
||||||
+ " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.");
|
+ " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private FailureAnalysis performAnalysis(String pattern) {
|
private FailureAnalysis performAnalysis(String pattern) {
|
||||||
|
|
Loading…
Reference in New Issue