diff options
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r-- | src/main/java/com/juick/service/SubscriptionServiceImpl.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/com/juick/service/SubscriptionServiceImpl.java b/src/main/java/com/juick/service/SubscriptionServiceImpl.java index 977fbec0..83cf682f 100644 --- a/src/main/java/com/juick/service/SubscriptionServiceImpl.java +++ b/src/main/java/com/juick/service/SubscriptionServiceImpl.java @@ -63,11 +63,9 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip List<Integer> tags = tagService.getMessageTagsIDs(mid); List<String> tagsStr = tagService.getMessageTags(mid).stream().map(t -> t.getTag().getName()).collect(Collectors.toList()); - Set<Integer> set = new HashSet<>(); - set.addAll( - users.stream() - .map(User::getUid).filter(u -> Collections.disjoint(tagService.getUserBLTags(u), tagsStr)) - .collect(Collectors.toList())); + Set<Integer> set = new HashSet<>(users.stream() + .map(User::getUid).filter(u -> Collections.disjoint(tagService.getUserBLTags(u), tagsStr)) + .collect(Collectors.toList())); if (!tags.isEmpty()) { |