From: David ‘Bombe’ Roden Date: Fri, 6 Jan 2017 19:26:15 +0000 (+0100) Subject: Use diamond operator X-Git-Tag: 0.9.7^2~367 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2a1b3d5cd4a14a2439c87ca016a66fdff51af971;p=Sone.git Use diamond operator --- 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 --- 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. */ - List sortedPosts = new ArrayList(posts); + List sortedPosts = new ArrayList<>(posts); Collections.sort(sortedPosts, Post.NEWEST_FIRST); /* paginate them. */ - Pagination pagination = new Pagination(sortedPosts, webInterface.getCore().getPreferences().getPostsPerPage()).setPage(parseInt(request.getHttpRequest().getParam("page"), 0)); + Pagination pagination = new Pagination<>(sortedPosts, webInterface.getCore().getPreferences().getPostsPerPage()).setPage(parseInt(request.getHttpRequest().getParam("page"), 0)); templateContext.set("pagination", pagination); templateContext.set("posts", pagination.getItems()); }