aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers/Site.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/www/controllers/Site.java
parent54f27794e7fee1113115baafe1b86fdbcde8e7c2 (diff)
`Collectors.toList()` -> `toList()`
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Site.java')
-rw-r--r--src/main/java/com/juick/www/controllers/Site.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java
index dcb89718..dadf7ed6 100644
--- a/src/main/java/com/juick/www/controllers/Site.java
+++ b/src/main/java/com/juick/www/controllers/Site.java
@@ -95,7 +95,7 @@ public class Site {
model.addAttribute("tagStats",
tagService.getUserTagStats(user.getUid()).stream()
.sorted((e1, e2) -> Integer.compare(e2.getUsageCount(), e1.getUsageCount())).limit(20)
- .map(t -> t.getTag().getName()).collect(Collectors.toList()));
+ .map(t -> t.getTag().getName()).toList());
}
@GetMapping("/login")
@@ -195,7 +195,7 @@ public class Site {
List<Integer> unread = messagesService.getUnread(visitor);
visitor.setUnreadCount(unread.size());
List<Integer> blUIDs = userService.checkBL(visitor.getUid(),
- msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList()));
+ msgs.stream().map(m -> m.getUser().getUid()).toList());
msgs.forEach(m -> m.ReadOnly |= blUIDs.contains(m.getUser().getUid()));
}
model.addAttribute("msgs", msgs);
@@ -301,7 +301,7 @@ public class Site {
List<Integer> unread = messagesService.getUnread(visitor);
visitor.setUnreadCount(unread.size());
List<Integer> blUIDs = userService.checkBL(visitor.getUid(),
- msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList()));
+ msgs.stream().map(m -> m.getUser().getUid()).toList());
msgs.forEach(m -> m.ReadOnly |= blUIDs.contains(m.getUser().getUid()));
}
model.addAttribute("msgs", msgs);
@@ -338,7 +338,7 @@ public class Site {
model.addAttribute("tags",
tagService.getUserTagStats(user.getUid()).stream()
.sorted((e1, e2) -> Integer.compare(e2.getUsageCount(), e1.getUsageCount()))
- .map(t -> t.getTag().getName()).collect(Collectors.toList()));
+ .map(t -> t.getTag().getName()).toList());
return "views/blog_tags";
}
@@ -423,7 +423,7 @@ public class Site {
List<Integer> unread = messagesService.getUnread(visitor);
visitor.setUnreadCount(unread.size());
List<Integer> blUIDs = userService.checkBL(visitor.getUid(),
- msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList()));
+ msgs.stream().map(m -> m.getUser().getUid()).toList());
msgs.forEach(m -> m.ReadOnly |= blUIDs.contains(m.getUser().getUid()));
fillUserModel(model, visitor, visitor);
}
@@ -569,7 +569,7 @@ public class Site {
model.addAttribute("visitorSubscribed", messagesService.isSubscribed(visitor.getUid(), msg.getMid()));
model.addAttribute("visitorInBL", userService.isInBL(msg.getUser().getUid(), visitor.getUid()));
model.addAttribute("recomm", messagesService.getMessagesRecommendations(Collections.singletonList(msg.getMid()))
- .stream().map(Pair::getRight).collect(Collectors.toList()));
+ .stream().map(Pair::getRight).toList());
List<Integer> blUIDs = new ArrayList<>();
for (Message reply : replies) {
if (reply.getUser().getUid() != msg.getUser().getUid() && !blUIDs.contains(reply.getUser().getUid())) {
@@ -609,7 +609,7 @@ public class Site {
model.addAttribute("tags",
tagService.getUserTagStats(visitor.getUid()).stream()
.sorted((e1, e2) -> Integer.compare(e2.getUsageCount(), e1.getUsageCount()))
- .map(t -> t.getTag().getName()).collect(Collectors.toList()));
+ .map(t -> t.getTag().getName()).toList());
return "views/post";
}