Commit 279f48b2 authored by Konstantin's avatar Konstantin
Browse files

#22 Периодическая ошибка при команде /statf Delete user if message is empty.

parent 0c6bb437
Pipeline #353 passed with stage
in 1 minute and 55 seconds
......@@ -102,7 +102,9 @@ public final class Statistics {
public List<Chart> getTop10UsedWordsFromEachUser(Instant from) {
Map<String, List<String>> userToWords = storage.findAllWordsByUserFrom(from);
//remove user, if message is empty.
userToWords.entrySet().removeIf(entry -> entry.getValue().size() == 0);
List<FrequentlyUsedWordsByEachUserChart> chart = new ArrayList<>();
userToWords.forEach((user, words) -> {
HashMap<String, Integer> wordsFrequency = new HashMap<>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment