From cea9aba8d0e4833bac428d071664cbe84e6180c9 Mon Sep 17 00:00:00 2001 From: xufenglei <xufenglei> Date: Fri, 15 Jun 2018 09:47:49 +0800 Subject: [PATCH] update --- src/main/java/com/moral/security/auth/jwt/SkipPathRequestMatcher.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/moral/security/auth/jwt/SkipPathRequestMatcher.java b/src/main/java/com/moral/security/auth/jwt/SkipPathRequestMatcher.java index 7c747d8..a0302ed 100644 --- a/src/main/java/com/moral/security/auth/jwt/SkipPathRequestMatcher.java +++ b/src/main/java/com/moral/security/auth/jwt/SkipPathRequestMatcher.java @@ -7,6 +7,7 @@ import javax.servlet.http.HttpServletRequest; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; /** @@ -21,7 +22,8 @@ private RequestMatcher processingMatcher; public SkipPathRequestMatcher(List<String> pathsToSkip, String processingPath) { - Assert.notNull(pathsToSkip); + pathsToSkip = Optional.of(pathsToSkip) + .orElseThrow(()-> new NullPointerException("In Method SkipPathRequestMatcher,Param pathsToSkip can't be null.")); List<RequestMatcher> m = pathsToSkip.stream().map(path -> new AntPathRequestMatcher(path)).collect(Collectors.toList()); matchers = new OrRequestMatcher(m); processingMatcher = new AntPathRequestMatcher(processingPath); -- Gitblit v1.8.0