Fix string handling to avoid exceptions when doing path extraction

Issue: SPR-15259
This commit is contained in:
Andy Clement
2017-02-15 16:36:09 -08:00
parent 51f2042e97
commit f98ea11e5e
2 changed files with 10 additions and 2 deletions

View File

@@ -467,6 +467,14 @@ public class PathPatternMatcherTests {
}
}
@Test
public void extractPathWithinPattern_spr15259() {
checkExtractPathWithinPattern("/**","/","");
checkExtractPathWithinPattern("/**","//","");
checkExtractPathWithinPattern("/**","","");
checkExtractPathWithinPattern("/**","/foobar","foobar");
}
@Test
public void extractPathWithinPattern() throws Exception {
checkExtractPathWithinPattern("/welcome*/", "/welcome/", "welcome");