Simplification

This commit is contained in:
M66B 2023-03-22 21:28:30 +01:00
parent 7094d2b9cc
commit d7a15b589a
1 changed files with 5 additions and 7 deletions

View File

@ -388,14 +388,12 @@ public class MessageClassifier {
}
private static int getWordIndex(String word) {
synchronized (wordIndex) {
Integer index = wordIndex.get(word);
if (index == null) {
index = wordIndex.size();
wordIndex.put(word, index);
}
return index;
Integer index = wordIndex.get(word);
if (index == null) {
index = wordIndex.size();
wordIndex.put(word, index);
}
return index;
}
private static String getWord(Integer index) {