diff options
Diffstat (limited to 'src/main/java/com/juick/service/SubscriptionServiceImpl.java')
-rw-r--r-- | src/main/java/com/juick/service/SubscriptionServiceImpl.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/juick/service/SubscriptionServiceImpl.java b/src/main/java/com/juick/service/SubscriptionServiceImpl.java index 0b8d9f26..2e475256 100644 --- a/src/main/java/com/juick/service/SubscriptionServiceImpl.java +++ b/src/main/java/com/juick/service/SubscriptionServiceImpl.java @@ -60,9 +60,9 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip List<User> subscribers = userService.getUserReaders(uid); List<User> mentionedUsers = userService.getUsersByName(MessageUtils.getMentions(msg).stream() .map(u -> u.substring(1)) - .collect(Collectors.toList())).stream() + .toList()).stream() .filter(u -> !userService.isInBL(u.getUid(), msg.getUser().getUid())) - .collect(Collectors.toList()); + .toList(); List<User> users = ListUtils.union(subscribers, mentionedUsers); List<Integer> tags = tagService.getMessageTagsIDs(mid); List<String> tagsStr = tagService.getMessageTags(mid).stream().map(t -> t.getTag().getName()) @@ -105,12 +105,12 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip Integer.class, msg.getMid(), reply.getUser().getUid())); List<User> mentionedUsers = userService.getUsersByName(MessageUtils.getMentions(reply).stream() - .map(u -> u.substring(1)).collect(Collectors.toList())); + .map(u -> u.substring(1)).toList()); List<User> users = IteratorUtils.toList(CollectionUtils.union(subscribers, mentionedUsers).iterator()); if (!users.isEmpty()) { return users.stream() .filter(u -> blacklisted || !u.isBanned() && !userService.isReplyToBL(u, reply)) - .collect(Collectors.toList()); + .toList(); } return Collections.emptyList(); } @@ -125,7 +125,7 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip .filter(u -> !userService.isInBLAny(u.getUid(), msg.getUser().getUid())) .filter(u -> Collections.disjoint(tagService.getUserBLTags(u.getUid()), msgTags)) - .collect(Collectors.toList()); + .toList(); } return Collections.emptyList(); } |