remove deprecated methods

This commit is contained in:
Looly
2021-06-16 00:51:20 +08:00
parent 8b85134c4b
commit f9b6110042
59 changed files with 214 additions and 2185 deletions

View File

@@ -112,18 +112,6 @@ public final class SensitiveUtil {
return sensitiveTree.isMatch(JSONUtil.toJsonStr(obj));
}
/**
* 查找敏感词,返回找到的第一个敏感词
*
* @param text 文本
* @return 敏感词
* @deprecated 请使用 {@link #getFoundFirstSensitive(String)}
*/
@Deprecated
public static String getFindedFirstSensitive(String text) {
return sensitiveTree.match(text);
}
/**
* 查找敏感词,返回找到的第一个敏感词
*
@@ -135,18 +123,6 @@ public final class SensitiveUtil {
return sensitiveTree.matchWord(text);
}
/**
* 查找敏感词,返回找到的第一个敏感词
*
* @param obj bean会被转为JSON字符串
* @return 敏感词
* @deprecated 请使用 {@link #getFoundFirstSensitive(Object)}
*/
@Deprecated
public static String getFindedFirstSensitive(Object obj) {
return sensitiveTree.match(JSONUtil.toJsonStr(obj));
}
/**
* 查找敏感词,返回找到的第一个敏感词
*
@@ -157,18 +133,6 @@ public final class SensitiveUtil {
return sensitiveTree.matchWord(JSONUtil.toJsonStr(obj));
}
/**
* 查找敏感词,返回找到的所有敏感词
*
* @param text 文本
* @return 敏感词
* @deprecated 请使用 {@link #getFoundAllSensitive(String)}
*/
@Deprecated
public static List<String> getFindedAllSensitive(String text) {
return sensitiveTree.matchAll(text);
}
/**
* 查找敏感词,返回找到的所有敏感词
*
@@ -180,22 +144,6 @@ public final class SensitiveUtil {
return sensitiveTree.matchAllWords(text);
}
/**
* 查找敏感词,返回找到的所有敏感词<br>
* 密集匹配原则:假如关键词有 ab,b文本是abab将匹配 [ab,b,ab]<br>
* 贪婪匹配最长匹配原则假如关键字a,ab最长匹配将匹配[a, ab]
*
* @param text 文本
* @param isDensityMatch 是否使用密集匹配原则
* @param isGreedMatch 是否使用贪婪匹配(最长匹配)原则
* @return 敏感词
* @deprecated 请使用 {@link #getFoundAllSensitive(String, boolean, boolean)}
*/
@Deprecated
public static List<String> getFindedAllSensitive(String text, boolean isDensityMatch, boolean isGreedMatch) {
return sensitiveTree.matchAll(text, -1, isDensityMatch, isGreedMatch);
}
/**
* 查找敏感词,返回找到的所有敏感词<br>
* 密集匹配原则:假如关键词有 ab,b文本是abab将匹配 [ab,b,ab]<br>
@@ -210,18 +158,6 @@ public final class SensitiveUtil {
return sensitiveTree.matchAllWords(text, -1, isDensityMatch, isGreedMatch);
}
/**
* 查找敏感词,返回找到的所有敏感词
*
* @param bean 对象会被转为JSON
* @return 敏感词
* @deprecated 请使用 {@link #getFoundAllSensitive(Object)}
*/
@Deprecated
public static List<String> getFindedAllSensitive(Object bean) {
return sensitiveTree.matchAll(JSONUtil.toJsonStr(bean));
}
/**
* 查找敏感词,返回找到的所有敏感词
*
@@ -233,22 +169,6 @@ public final class SensitiveUtil {
return sensitiveTree.matchAllWords(JSONUtil.toJsonStr(bean));
}
/**
* 查找敏感词,返回找到的所有敏感词<br>
* 密集匹配原则:假如关键词有 ab,b文本是abab将匹配 [ab,b,ab]<br>
* 贪婪匹配最长匹配原则假如关键字a,ab最长匹配将匹配[a, ab]
*
* @param bean 对象会被转为JSON
* @param isDensityMatch 是否使用密集匹配原则
* @param isGreedMatch 是否使用贪婪匹配(最长匹配)原则
* @return 敏感词
* @deprecated 请使用 {@link #getFoundAllSensitive(Object, boolean, boolean)}
*/
@Deprecated
public static List<String> getFindedAllSensitive(Object bean, boolean isDensityMatch, boolean isGreedMatch) {
return sensitiveTree.matchAll(JSONUtil.toJsonStr(bean), -1, isDensityMatch, isGreedMatch);
}
/**
* 查找敏感词,返回找到的所有敏感词<br>
* 密集匹配原则:假如关键词有 ab,b文本是abab将匹配 [ab,b,ab]<br>