From de46b2367752c693e4a849facca1c87d4131a844 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 6 Feb 2021 07:51:57 +0100 Subject: Replace raw-type uses of Post with Post. Change-Id: I3ba2094ea9471d8d86af7c8d6a537d7eb43961de --- src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java | 2 +- src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java index 3a16868..f783ba0 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java @@ -413,7 +413,7 @@ public abstract class Post> extends PanacheEntityBase { if (!(o instanceof Post)) { return false; } - Post post = (Post) o; + Post post = (Post) o; return Objects.equals(id, post.id); } diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java index 7ecfcba..c0d8647 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java @@ -202,7 +202,7 @@ public abstract class PostResource { @GET @Produces(APPLICATION_JSON) @Path("{id}") - public Post getPostJson(@PathParam("id") int id) { + public Post getPostJson(@PathParam("id") int id) { return getPostIfVisible(id); } @@ -443,7 +443,7 @@ public abstract class PostResource { return entityManager.unwrap(Session.class); } - protected static void assignPostTargets(Post.Visibility visibility, User user, Post post) { + protected static void assignPostTargets(Post.Visibility visibility, User user, Post post) { switch (visibility) { case PUBLIC: post.targets = Set.of(Role.getWorld()); @@ -459,7 +459,7 @@ public abstract class PostResource { } } - protected final Post getPostIfVisible(int id) { + protected final Post getPostIfVisible(int id) { @CheckForNull var user = getCurrentUser(); var message = getSession().byId(Post.class).load(id); -- cgit v1.2.3