Merge pull request #1647 from izeye:polish-20180120

* pr/1647:
  Polish InterceptorRegistration
This commit is contained in:
Stephane Nicoll 2018-01-20 10:15:53 +01:00
commit 0ca4cd1cf8
1 changed files with 2 additions and 4 deletions

View File

@ -60,8 +60,7 @@ public class InterceptorRegistration {
* Add URL patterns to which the registered interceptor should apply to.
*/
public InterceptorRegistration addPathPatterns(String... patterns) {
this.includePatterns.addAll(Arrays.asList(patterns));
return this;
return addPathPatterns(Arrays.asList(patterns));
}
/**
@ -77,8 +76,7 @@ public class InterceptorRegistration {
* Add URL patterns to which the registered interceptor should not apply to.
*/
public InterceptorRegistration excludePathPatterns(String... patterns) {
this.excludePatterns.addAll(Arrays.asList(patterns));
return this;
return excludePathPatterns(Arrays.asList(patterns));
}
/**