projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use diamond operator
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
NewPage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/NewPage.java
b/src/main/java/net/pterodactylus/sone/web/NewPage.java
index
406054d
..
fc8bb56
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/NewPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/NewPage.java
@@
-70,11
+70,11
@@
public class NewPage extends SoneTemplatePage {
}
/* filter and sort them. */
}
/* filter and sort them. */
- List<Post> sortedPosts = new ArrayList(posts);
+ List<Post> sortedPosts = new ArrayList
<>
(posts);
Collections.sort(sortedPosts, Post.NEWEST_FIRST);
/* paginate them. */
Collections.sort(sortedPosts, Post.NEWEST_FIRST);
/* paginate them. */
- Pagination<Post> pagination = new Pagination<
Post
>(sortedPosts, webInterface.getCore().getPreferences().getPostsPerPage()).setPage(parseInt(request.getHttpRequest().getParam("page"), 0));
+ Pagination<Post> pagination = new Pagination<>(sortedPosts, webInterface.getCore().getPreferences().getPostsPerPage()).setPage(parseInt(request.getHttpRequest().getParam("page"), 0));
templateContext.set("pagination", pagination);
templateContext.set("posts", pagination.getItems());
}
templateContext.set("pagination", pagination);
templateContext.set("posts", pagination.getItems());
}