aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/rss/MessagesView.java1
-rw-r--r--juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java3
-rw-r--r--juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java8
3 files changed, 7 insertions, 5 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/rss/MessagesView.java b/juick-server/src/main/java/com/juick/server/api/rss/MessagesView.java
index 7be9ec09..9e1de074 100644
--- a/juick-server/src/main/java/com/juick/server/api/rss/MessagesView.java
+++ b/juick-server/src/main/java/com/juick/server/api/rss/MessagesView.java
@@ -62,6 +62,7 @@ public class MessagesView extends AbstractRssFeedView {
setContentType("application/rss+xml;charset=UTF-8");
}
+ @SuppressWarnings("unchecked")
@Override
protected List<Item> buildFeedItems(@Nonnull Map<String, Object> model,
@Nonnull HttpServletRequest request,
diff --git a/juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java b/juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java
index a5411397..b1e813c4 100644
--- a/juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java
+++ b/juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java
@@ -56,8 +56,9 @@ public class RepliesView extends AbstractRssFeedView {
setContentType("application/rss+xml;charset=UTF-8");
}
+ @SuppressWarnings("unchecked")
@Override
- protected List<Item> buildFeedItems(@Nonnull Map<String, Object> model,
+ protected @Nonnull List<Item> buildFeedItems(@Nonnull Map<String, Object> model,
@Nonnull HttpServletRequest request,
@Nonnull HttpServletResponse response) {
List<ResponseReply> msgs = (List<ResponseReply>)model.get("messages");
diff --git a/juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java b/juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java
index eb103136..90dec35f 100644
--- a/juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java
+++ b/juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java
@@ -38,16 +38,16 @@ public class JuickModuleGenerator implements ModuleGenerator {
return JuickModule.URI;
}
- private static final Set NAMESPACES;
+ private static final Set<Namespace> NAMESPACES;
static {
- Set nss = new HashSet();
+ Set<Namespace> nss = new HashSet<>();
nss.add(JUICK_NS);
NAMESPACES = Collections.unmodifiableSet(nss);
}
@Override
- public Set getNamespaces() {
+ public Set<Namespace> getNamespaces() {
return NAMESPACES;
}
@@ -56,7 +56,7 @@ public class JuickModuleGenerator implements ModuleGenerator {
// this is not necessary, it is done to avoid the namespace definition in every item.
Element root = element;
while (root.getParent()!=null && root.getParent() instanceof Element) {
- root = (Element) element.getParent();
+ root = element.getParentElement();
}
root.addNamespaceDeclaration(JUICK_NS);