mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-10-29 02:57:13 +08:00
refactor: 根据 Sonar 建议调整,StrUtil => CharSequenceUtil
工具层调整以减少 Sonar 建议,应用层则可忽略,怎么用方便怎么来
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user