[ISSUE #11343]Fix NPE (#11385)

* fix NPE

* fix NPE
This commit is contained in:
zhanghong 2023-11-17 17:11:26 +08:00 committed by GitHub
parent ed9a55bac6
commit 65917ec986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,10 @@ public class ParamCheckerFilter implements Filter {
HttpServletResponse resp = (HttpServletResponse) response;
try {
Method method = methodsCache.getMethod(req);
if (method == null) {
chain.doFilter(req, resp);
return;
}
ExtractorManager.Extractor extractor = method.getAnnotation(ExtractorManager.Extractor.class);
if (extractor == null) {
extractor = method.getDeclaringClass().getAnnotation(ExtractorManager.Extractor.class);