Reduce API Surface in PathPatternRegistry

This commit reduces the exposition of `PathPattern` instances throughout
the `HandlerMapping` API and removes some methods from its public API.

Issue: SPR-14544
This commit is contained in:
Brian Clozel
2017-02-09 22:09:46 +01:00
parent 4999898617
commit 8d43f45515
13 changed files with 135 additions and 127 deletions

View File

@@ -146,8 +146,8 @@ public class PathPatternRegistryTests {
PathPattern fooTwo = this.registry.parsePattern("/f?o");
assertThat(fooOne.compareTo(fooTwo), is(0));
this.registry.add(fooOne);
this.registry.add(fooTwo);
this.registry.register("/fo?");
this.registry.register("/f?o");
Set<PathPattern> matches = this.registry.findMatches("/foo");
assertThat(getPatternList(matches), Matchers.contains("/f?o", "/fo?"));
}