summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2021-02-06 07:51:57 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2021-02-06 11:14:06 +0100
commitde46b2367752c693e4a849facca1c87d4131a844 (patch)
treea28d4543cc3ab01204ea70fd235cf136d075b76e
parentbe86a628e64acf33c694f8eda0e7d695fc51ec0f (diff)
Replace raw-type uses of Post with Post<?>.
Change-Id: I3ba2094ea9471d8d86af7c8d6a537d7eb43961de
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java2
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java6
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);