diff options
author | Vitaly Takmazov | 2022-10-24 01:09:32 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-11-25 14:16:03 +0300 |
commit | 9faf43a6c4b933b5f97be4348d461bf91f5bf2e2 (patch) | |
tree | 238968b200c73d905b9367154fddb7ac3eff6274 /src/main/java/com/juick/www/rss | |
parent | e0a98e8bd925bc5aebe49d011bb4ec17978f8bd9 (diff) |
Spring Boot 3
Diffstat (limited to 'src/main/java/com/juick/www/rss')
-rw-r--r-- | src/main/java/com/juick/www/rss/MessagesView.java | 12 | ||||
-rw-r--r-- | src/main/java/com/juick/www/rss/RepliesView.java | 14 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/main/java/com/juick/www/rss/MessagesView.java b/src/main/java/com/juick/www/rss/MessagesView.java index 2c7d4a7d..dde67d7b 100644 --- a/src/main/java/com/juick/www/rss/MessagesView.java +++ b/src/main/java/com/juick/www/rss/MessagesView.java @@ -26,11 +26,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import javax.annotation.Nonnull; -import javax.annotation.PostConstruct; import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import com.juick.model.Attachment; import com.juick.model.Message; @@ -57,6 +53,10 @@ import com.rometools.rome.feed.rss.Guid; import com.rometools.rome.feed.rss.Image; import com.rometools.rome.feed.rss.Item; +import jakarta.annotation.PostConstruct; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -81,8 +81,8 @@ public class MessagesView extends AbstractRssFeedView { @SuppressWarnings("unchecked") @Override - protected List<Item> buildFeedItems(@Nonnull Map<String, Object> model, @Nonnull HttpServletRequest request, - @Nonnull HttpServletResponse response) { + protected List<Item> buildFeedItems(Map<String, Object> model, HttpServletRequest request, + HttpServletResponse response) { List<Message> msgs = (List<Message>) model.get("messages"); return msgs.stream().map(this::createRssItem).collect(Collectors.toList()); } diff --git a/src/main/java/com/juick/www/rss/RepliesView.java b/src/main/java/com/juick/www/rss/RepliesView.java index 9cb98c94..83c8e104 100644 --- a/src/main/java/com/juick/www/rss/RepliesView.java +++ b/src/main/java/com/juick/www/rss/RepliesView.java @@ -30,15 +30,17 @@ import com.rometools.rome.feed.rss.Channel; import com.rometools.rome.feed.rss.Description; import com.rometools.rome.feed.rss.Guid; import com.rometools.rome.feed.rss.Item; + +import jakarta.annotation.PostConstruct; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.servlet.view.feed.AbstractRssFeedView; import javax.annotation.Nonnull; -import javax.annotation.PostConstruct; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.net.URI; import java.net.URISyntaxException; import java.util.List; @@ -59,9 +61,9 @@ public class RepliesView extends AbstractRssFeedView { @SuppressWarnings("unchecked") @Override - protected @Nonnull List<Item> buildFeedItems(@Nonnull Map<String, Object> model, - @Nonnull HttpServletRequest request, - @Nonnull HttpServletResponse response) { + protected @Nonnull List<Item> buildFeedItems(Map<String, Object> model, + HttpServletRequest request, + HttpServletResponse response) { List<ResponseReply> msgs = (List<ResponseReply>)model.get("messages"); return msgs.stream().map(this::createRssItem).collect(Collectors.toList()); } |