Replace raw-type uses of Post with Post<?>.
Change-Id: I3ba2094ea9471d8d86af7c8d6a537d7eb43961de
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 @@
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 @@
@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 @@
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 @@
}
}
- protected final Post getPostIfVisible(int id) {
+ protected final Post<?> getPostIfVisible(int id) {
@CheckForNull var user = getCurrentUser();
var message = getSession().byId(Post.class).load(id);