When a PatternParseException for a regexp path pattern occurs in a Spring MVC application launched by Spring Boot, the PatternParseFailureAnalyzer logs a message like this in console :
Description:
Invalid mapping pattern detected: /{path:\w+/\w+}
^
Expected close capture character after variable name }
...
At line 4, the mark '^' which indicates the error in the pattern is misplaced because the string returned by PatternParseException.toDetailedString() is appended to "Invalid mapping pattern detected:".
So this PR proposes to insert a "\n" after "Invalid mapping pattern detected:" . The error mark will be well positioned like this :
Description:
Invalid mapping pattern detected:
/{path:\w+/\w+}
^
Expected close capture character after variable name }
The only change in the main code is th addition of "\n". The rest of the changes adapts the test PatternParseFailureAnalyzerTests.
NB : I was not able to run the ./gradlew check for the whole project (8 tests failed for Task :buildSrc:test) but I ran tests for the module spring-boot-project/spring-boot and the number of failling tests is the same after the change
Comment From: mhalbritter
Thank you very much and congratulations on your first contribution :tada:!