diff options
author | Vitaly Takmazov | 2023-02-22 02:14:18 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-02-22 02:14:43 +0300 |
commit | 2c8032aa075e9aaa73746429b05546a48c7e007e (patch) | |
tree | da1468c70625469a35918ce0a6361178933232a0 /src/main/java/com/juick/service | |
parent | 64e6b703b7fa50a31dc0b73ec85230aa99c77bd5 (diff) |
Fix memory issues when using Reaction
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r-- | src/main/java/com/juick/service/MessagesServiceImpl.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index b0e365f8..083524b1 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -845,8 +845,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ Reaction reaction = new Reaction(likeId); reaction.setCount(count); reaction.setDescription(description); - results.computeIfAbsent(messageId, HashSet::new); - results.get(messageId).add(reaction); + results.computeIfAbsent(messageId, HashSet::new).add(reaction); } return results; }); |