From 2a858017b7d9a620d1083b69b7ca038c34a5ba89 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 24 Dec 2022 03:15:44 +0300 Subject: `Collectors.toList()` -> `toList()` --- src/main/java/com/juick/www/api/activity/Profile.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/juick/www/api/activity') diff --git a/src/main/java/com/juick/www/api/activity/Profile.java b/src/main/java/com/juick/www/api/activity/Profile.java index c87d6118..fb66400d 100644 --- a/src/main/java/com/juick/www/api/activity/Profile.java +++ b/src/main/java/com/juick/www/api/activity/Profile.java @@ -142,7 +142,7 @@ public class Profile { String personUri = uri.path(String.format("/u/%s", userName)).toUriString(); List mids = messagesService.getUserBlog(user.getUid(), 0, before); List notes = messagesService.getMessages(visitor, mids).stream().map(activityPubManager::makeNote) - .collect(Collectors.toList()); + .toList(); OrderedCollectionPage page = new OrderedCollectionPage(); page.setPartOf(uri.replacePath(String.format("/u/%s/blog/toc", userName)).toUriString()); page.setFirst(uri.replacePath(String.format("/u/%s/blog", userName)).toUriString()); @@ -155,7 +155,7 @@ public class Profile { create.setObject(a); create.setPublished(a.getPublished()); return create; - }).collect(Collectors.toList())); + }).toList()); int beforeNext = mids.stream().reduce((fst, second) -> second).orElse(0); if (beforeNext > 0) { page.setNext(uri.queryParam("before", beforeNext).toUriString()); @@ -200,7 +200,7 @@ public class Profile { follower.setPreferredUsername(a.getName()); follower.setUrl(profileUriBuilder.personWebUri(a)); return follower; - }).collect(Collectors.toList())); + }).toList()); boolean hasNext = followers.size() <= 20 * page; if (hasNext) { result.setNext(uriComponentsBuilder.queryParam("page", page + 1).toUriString()); @@ -244,7 +244,7 @@ public class Profile { follower.setPreferredUsername(a.getName()); follower.setUrl(profileUriBuilder.personWebUri(a)); return follower; - }).collect(Collectors.toList())); + }).toList()); boolean hasNext = following.size() <= 20 * page; if (hasNext) { result.setNext(uriComponentsBuilder.queryParam("page", page + 1).toUriString()); -- cgit v1.2.3