diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java | 2 | ||||
-rw-r--r-- | src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java | 6 |
2 files changed, 4 insertions, 4 deletions
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<Text extends PostText<?>> 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); |