aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/activity
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/api/activity
parent54f27794e7fee1113115baafe1b86fdbcde8e7c2 (diff)
`Collectors.toList()` -> `toList()`
Diffstat (limited to 'src/main/java/com/juick/www/api/activity')
-rw-r--r--src/main/java/com/juick/www/api/activity/Profile.java8
1 files changed, 4 insertions, 4 deletions
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<Integer> mids = messagesService.getUserBlog(user.getUid(), 0, before);
List<Note> 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());