src/main/java/org/starrier/common/utils/SensitiveWordUtil.java
Showing 2 of 2 total issues
Method checkSensitiveWord
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
private static int checkSensitiveWord(String txt, int beginIndex, int matchType) { //敏感词结束标识位:用于敏感词只有1位的情况 boolean flag = false; //匹配标识数默认为0 int matchFlag = 0;
- Read upRead up
Method initSensitiveWordMap
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
@SuppressWarnings({"rawtypes", "unchecked"}) private static void initSensitiveWordMap(Set<String> sensitiveWordSet) { //初始化敏感词容器,减少扩容操作 sensitiveWordMap = new HashMap<>(sensitiveWordSet.size()); String key;
- Read upRead up