From d7a15b589ac054c0be98c9bebbb9b93a0ef92a49 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 22 Mar 2023 21:28:30 +0100 Subject: [PATCH] Simplification --- .../java/eu/faircode/email/MessageClassifier.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/MessageClassifier.java b/app/src/main/java/eu/faircode/email/MessageClassifier.java index 6310b40538..37de331481 100644 --- a/app/src/main/java/eu/faircode/email/MessageClassifier.java +++ b/app/src/main/java/eu/faircode/email/MessageClassifier.java @@ -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) {