isEmpty | “扫黄”
This commit is contained in:
@@ -38,7 +38,7 @@ public class LineExt {
|
||||
return null;
|
||||
}
|
||||
@Nullable Pattern pattern = ConfCache.pattern(lineInfo.project, keyMap, path);
|
||||
if (pattern == null || pattern.pattern().length() == 0) {
|
||||
if (pattern == null || pattern.pattern().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
@NotNull Map<String, Map<String, List<String>>> docMap = ConfCache.docMap(path, name, ext);
|
||||
@@ -100,7 +100,7 @@ public class LineExt {
|
||||
@NotNull Map<String, Map<String, List<String>>> docMap,
|
||||
@NotNull Map<String, Map<String, List<String>>> treeMap) {
|
||||
word = word.trim();
|
||||
if (word.length() == 0) {
|
||||
if (word.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
@Nullable String wordDoc = GetFromDocMap.get(docMap, word);
|
||||
|
||||
@@ -31,7 +31,7 @@ class ConfFactory {
|
||||
String key = list.get(0);
|
||||
if (key.startsWith("?")) {
|
||||
exclude.add(key.substring(1));
|
||||
} else if (key.length() > 0 && !exclude.contains(key)) {
|
||||
} else if (!key.isEmpty() && !exclude.contains(key)) {
|
||||
sb.append(key).append("|");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,13 +36,13 @@ public class TsvLoader {
|
||||
@NotNull List<String> words = Splitter.on('\t').splitToList(line);
|
||||
if (!words.isEmpty()) {
|
||||
String key = words.get(0);
|
||||
if (key.length() == 0) {
|
||||
if (key.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if (patternKey) {
|
||||
key = StringEscapeUtils.unescapeJava(key);
|
||||
String del = DEL_PATTERN.matcher(key).replaceAll("");
|
||||
if (del.length() != 0) {
|
||||
if (!del.isEmpty()) {
|
||||
key = del;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user