diff options
author | Vitaly Takmazov | 2022-12-24 03:15:44 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-24 03:15:44 +0300 |
commit | 2a858017b7d9a620d1083b69b7ca038c34a5ba89 (patch) | |
tree | 3b192b9ab0aee2a38bbd3243a2977409ae6a033e /src/main/java/com/juick/service/MessagesServiceImpl.java | |
parent | 54f27794e7fee1113115baafe1b86fdbcde8e7c2 (diff) |
`Collectors.toList()` -> `toList()`
Diffstat (limited to 'src/main/java/com/juick/service/MessagesServiceImpl.java')
-rw-r--r-- | src/main/java/com/juick/service/MessagesServiceImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index 366d14f5..3a4c3767 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -431,7 +431,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ List<Pair<Integer, User>> allRecommendations = getMessagesRecommendations(List.of(mid)); message.setRecommendations(new HashSet<>(allRecommendations.stream() - .filter(r -> r.getLeft().equals(mid)).map(Pair::getRight).collect(Collectors.toList()))); + .filter(r -> r.getLeft().equals(mid)).map(Pair::getRight).toList())); message.getRecommendations().forEach(r -> r.setAvatar(webApp.getAvatarUrl(r))); return Optional.of(message); } @@ -855,7 +855,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ msgs.forEach(m -> { m.setRecommendations(new HashSet<>(allRecommendations.stream() - .filter(r -> r.getLeft().equals(m.getMid())).map(Pair::getRight).collect(Collectors.toList()))); + .filter(r -> r.getLeft().equals(m.getMid())).map(Pair::getRight).toList())); m.getRecommendations().forEach(r -> r.setAvatar(webApp.getAvatarUrl(r))); }); |