aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/SubscriptionServiceImpl.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-24 03:15:44 +0300
committerGravatar Vitaly Takmazov2022-12-24 03:15:44 +0300
commit2a858017b7d9a620d1083b69b7ca038c34a5ba89 (patch)
tree3b192b9ab0aee2a38bbd3243a2977409ae6a033e /src/main/java/com/juick/service/SubscriptionServiceImpl.java
parent54f27794e7fee1113115baafe1b86fdbcde8e7c2 (diff)
`Collectors.toList()` -> `toList()`
Diffstat (limited to 'src/main/java/com/juick/service/SubscriptionServiceImpl.java')
-rw-r--r--src/main/java/com/juick/service/SubscriptionServiceImpl.java10
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();
}