refactor: 根据 Sonar 建议调整,StrUtil => CharSequenceUtil

工具层调整以减少 Sonar 建议,应用层则可忽略,怎么用方便怎么来
This commit is contained in:
2024-02-07 17:48:32 +08:00
parent 00bba33517
commit ea71cf573b
26 changed files with 117 additions and 114 deletions

View File

@@ -16,7 +16,7 @@
package top.charles7c.continew.starter.log.common.model;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.text.CharSequenceUtil;
import org.springframework.http.HttpHeaders;
import top.charles7c.continew.starter.core.util.IpUtils;
import top.charles7c.continew.starter.log.common.enums.Include;
@@ -99,7 +99,7 @@ public class LogRequest {
.map(Map.Entry::getValue)
.findFirst()
.orElse(null);
if (StrUtil.isNotBlank(userAgentString)) {
if (CharSequenceUtil.isNotBlank(userAgentString)) {
this.browser = (includes.contains(Include.BROWSER)) ? ServletUtils.getBrowser(userAgentString) : null;
this.os = (includes.contains(Include.OS)) ? ServletUtils.getOs(userAgentString) : null;
}