From 77ea3ce51464e69915922b276ca4d45bbd15e2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 19 Jul 2023 10:59:22 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20CryptoFilter=20nu?= =?UTF-8?q?ll=E5=88=A4=E6=96=AD=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/dromara/common/encrypt/filter/CryptoFilter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/org/dromara/common/encrypt/filter/CryptoFilter.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/org/dromara/common/encrypt/filter/CryptoFilter.java index 6d039bb1..c31e025a 100644 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/org/dromara/common/encrypt/filter/CryptoFilter.java +++ b/ruoyi-common/ruoyi-common-encrypt/src/main/java/org/dromara/common/encrypt/filter/CryptoFilter.java @@ -1,5 +1,6 @@ package org.dromara.common.encrypt.filter; +import cn.hutool.core.util.ObjectUtil; import jakarta.servlet.*; import jakarta.servlet.http.HttpServletRequest; import org.dromara.common.core.utils.StringUtils; @@ -8,7 +9,6 @@ import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import java.io.IOException; -import java.util.Objects; /** @@ -38,7 +38,8 @@ public class CryptoFilter implements Filter { } } } - chain.doFilter(Objects.requireNonNullElse(requestWrapper, request), response); + + chain.doFilter(ObjectUtil.defaultIfNull(requestWrapper, request), response); } @Override