Refine AntPathMatcher optimizations

Refine the optimizations made in 6f55ab69 in order to restore binary
compatibility and resolve a regression.

Tests of the form pathMatcher.match("/foo/bar/**", "/foo/bar") should
return true as this was the behavior in Spring 4.2.

Issue: SPR-13913
This commit is contained in:
Phillip Webb
2016-02-18 14:15:15 -08:00
parent 48ee9b52d4
commit c4117885bd
2 changed files with 54 additions and 47 deletions

View File

@@ -128,6 +128,8 @@ public class AntPathMatcherTests {
assertFalse(pathMatcher.match("/x/x/**/bla", "/x/x/x/"));
assertTrue(pathMatcher.match("/foo/bar/**", "/foo/bar")) ;
assertTrue(pathMatcher.match("", ""));
assertTrue(pathMatcher.match("/{bla}.*", "/testing.html"));