Skip to content

Commit 0ca4cd1

Browse files
committed
Merge pull request #1647 from izeye:polish-20180120
* pr/1647: Polish InterceptorRegistration
2 parents 283811b + 36d42bc commit 0ca4cd1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ public InterceptorRegistration(HandlerInterceptor interceptor) {
6060
* Add URL patterns to which the registered interceptor should apply to.
6161
*/
6262
public InterceptorRegistration addPathPatterns(String... patterns) {
63-
this.includePatterns.addAll(Arrays.asList(patterns));
64-
return this;
63+
return addPathPatterns(Arrays.asList(patterns));
6564
}
6665

6766
/**
@@ -77,8 +76,7 @@ public InterceptorRegistration addPathPatterns(List<String> patterns) {
7776
* Add URL patterns to which the registered interceptor should not apply to.
7877
*/
7978
public InterceptorRegistration excludePathPatterns(String... patterns) {
80-
this.excludePatterns.addAll(Arrays.asList(patterns));
81-
return this;
79+
return excludePathPatterns(Arrays.asList(patterns));
8280
}
8381

8482
/**

0 commit comments

Comments
 (0)