diff options
author | Vitaly Takmazov | 2022-12-15 20:25:15 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-15 20:26:51 +0300 |
commit | b1267ab73fd601dcc1636a64d86135d72631b525 (patch) | |
tree | bdc1ef50f1987bebcdfa776c781849e2c7da549b /src/main/java/com/juick/service | |
parent | c9617232d5eeced643b510c108384619a7fc79b0 (diff) |
Apply IDEA suggestions
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r-- | src/main/java/com/juick/service/SubscriptionServiceImpl.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/juick/service/SubscriptionServiceImpl.java b/src/main/java/com/juick/service/SubscriptionServiceImpl.java index ca813c67..0b8d9f26 100644 --- a/src/main/java/com/juick/service/SubscriptionServiceImpl.java +++ b/src/main/java/com/juick/service/SubscriptionServiceImpl.java @@ -66,13 +66,13 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip 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()) - .collect(Collectors.toList()); + .toList(); - Set<Integer> set = new HashSet<>(users.stream() + Set<Integer> set = users.stream() .filter(u -> !u.isBanned()) .map(User::getUid) .filter(u -> Collections.disjoint(tagService.getUserBLTags(u), tagsStr)) - .collect(Collectors.toList())); + .collect(Collectors.toSet()); if (!tags.isEmpty()) { List<Integer> tagUsers = getNamedParameterJdbcTemplate().queryForList( @@ -118,7 +118,7 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip @Override public List<User> getUsersSubscribedToUserRecommendations(final int uid, final Message msg) { List<String> msgTags = tagService.getMessageTags(msg.getMid()).stream().map(t -> t.getTag().getName()) - .collect(Collectors.toList()); + .toList(); if (msg.getLikes() == 1) { return userService.getUserReaders(uid).stream() .filter(u -> !u.equals(msg.getUser())) |