projects
/
demos
/
kafka
/
wordcount
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6738dd3
)
top10: 1.2.1 - Fixed possible NPE in `Top10ApplicationIT`
author
Kai Moritz
<kai@juplo.de>
Sat, 8 Jun 2024 17:35:21 +0000
(19:35 +0200)
committer
Kai Moritz
<kai@juplo.de>
Sat, 8 Jun 2024 17:35:21 +0000
(19:35 +0200)
src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
patch
|
blob
|
history
diff --git
a/src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
b/src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
index
84c81f5
..
cf52c1f
100644
(file)
--- a/
src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
+++ b/
src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
@@
-85,7
+85,9
@@
class TestData
static int countMessagesForUser(TestUser user, MultiValueMap<TestUser, TestRanking> messagesForUsers)
{
- return messagesForUsers.get(user).size();
+ return messagesForUsers.get(user) == null
+ ? 0
+ : messagesForUsers.get(user).size();
}