diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2021-02-06 07:51:57 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2021-02-06 11:14:06 +0100 |
commit | de46b2367752c693e4a849facca1c87d4131a844 (patch) | |
tree | a28d4543cc3ab01204ea70fd235cf136d075b76e /src/main/java | |
parent | be86a628e64acf33c694f8eda0e7d695fc51ec0f (diff) |
Replace raw-type uses of Post with Post<?>.
Change-Id: I3ba2094ea9471d8d86af7c8d6a537d7eb43961de
Diffstat (limited to 'src/main/java')
-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); |