aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/api/Messages.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-01-14 13:16:40 +0300
committerGravatar Vitaly Takmazov2016-01-14 13:16:40 +0300
commit5c207f65b0cafbaa0cbdae72a5a485cf7aa62556 (patch)
tree60c303f317236c2caab896173fafdaff1eebb115 /src/main/java/com/juick/api/Messages.java
parent38013dd67292fa186e3a07d098bc9a484ea2bd0f (diff)
parentee86970fcae9878af0adcad00cf5333647b8babf (diff)
Merge branch 'develop' of ssh://den.jabber.ru:2205/var/lib/git/com.juick.api into develop
Diffstat (limited to 'src/main/java/com/juick/api/Messages.java')
-rw-r--r--src/main/java/com/juick/api/Messages.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/com/juick/api/Messages.java b/src/main/java/com/juick/api/Messages.java
index 548e816f..cde3987f 100644
--- a/src/main/java/com/juick/api/Messages.java
+++ b/src/main/java/com/juick/api/Messages.java
@@ -6,12 +6,13 @@ import com.juick.xmpp.JID;
import com.juick.xmpp.Message;
import com.juick.xmpp.Stream;
import com.juick.xmpp.extensions.JuickMessage;
-import java.io.IOException;
-import java.sql.Connection;
-import java.util.ArrayList;
+
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.sql.Connection;
+import java.util.List;
/**
*
@@ -30,9 +31,9 @@ public class Messages {
public void doGetHome(HttpServletRequest request, HttpServletResponse response, int vuid) throws ServletException, IOException {
int before_mid = Utils.parseInt(request.getParameter("before_mid"), 0);
- ArrayList<Integer> mids = MessagesQueries.getMyFeed(sql, vuid, before_mid);
+ List<Integer> mids = MessagesQueries.getMyFeed(sql, vuid, before_mid);
if (mids != null && !mids.isEmpty()) {
- ArrayList<com.juick.Message> msgs = MessagesQueries.getMessages(sql, mids);
+ List<com.juick.Message> msgs = MessagesQueries.getMessages(sql, mids);
if (msgs != null && !msgs.isEmpty()) {
String json = messageSerializer.serializeList(msgs);
Main.replyJSON(request, response, json);
@@ -47,9 +48,9 @@ public class Messages {
public void doGetRecommended(HttpServletRequest request, HttpServletResponse response, int vuid) throws ServletException, IOException {
int before_mid = Utils.parseInt(request.getParameter("before_mid"), 0);
- ArrayList<Integer> mids = MessagesQueries.getUserRecommendations(sql, vuid, before_mid);
+ List<Integer> mids = MessagesQueries.getUserRecommendations(sql, vuid, before_mid);
if (mids != null && !mids.isEmpty()) {
- ArrayList<com.juick.Message> msgs = MessagesQueries.getMessages(sql, mids);
+ List<com.juick.Message> msgs = MessagesQueries.getMessages(sql, mids);
if (msgs != null && !msgs.isEmpty()) {
String json = messageSerializer.serializeList(msgs);
Main.replyJSON(request, response, json);