From 606f43f50904f7d811cf9b438e0e820e586be900 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 27 Jun 2016 13:16:43 +0300 Subject: spring-jdbc near complete --- src/main/java/com/juick/http/www/Errors.java | 2 +- src/main/java/com/juick/http/www/Main.java | 2 +- src/main/java/com/juick/http/www/PM.java | 16 ++-- .../java/com/juick/http/www/PageTemplates.java | 30 +++---- src/main/java/com/juick/http/www/Settings.java | 7 +- src/main/java/com/juick/http/www/User.java | 100 +++++---------------- src/main/java/com/juick/http/www/UserThread.java | 15 ++-- 7 files changed, 51 insertions(+), 121 deletions(-) (limited to 'src/main/java/com/juick/http/www') diff --git a/src/main/java/com/juick/http/www/Errors.java b/src/main/java/com/juick/http/www/Errors.java index 2161daf1..0044c209 100644 --- a/src/main/java/com/juick/http/www/Errors.java +++ b/src/main/java/com/juick/http/www/Errors.java @@ -20,7 +20,7 @@ public class Errors { com.juick.User visitor = Utils.getVisitorUser(sql, request, response); if (tagsHTML == null) { - tagsHTML = PageTemplates.getPopularTags(sql, 80); + tagsHTML = PageTemplates.formatPopularTags(sql, 80); } response.setStatus(404); diff --git a/src/main/java/com/juick/http/www/Main.java b/src/main/java/com/juick/http/www/Main.java index 604ccf9a..63bf1c1f 100644 --- a/src/main/java/com/juick/http/www/Main.java +++ b/src/main/java/com/juick/http/www/Main.java @@ -104,7 +104,7 @@ public class Main extends HttpServlet implements Stream.StreamListener { } @Override - public void onStreamFail(String e) {log("XMPP STREAM FAIL:" + e);} + public void onStreamFail(Exception e) {log("XMPP STREAM FAIL:" + e);} @Override public void onStreamReady() { diff --git a/src/main/java/com/juick/http/www/PM.java b/src/main/java/com/juick/http/www/PM.java index b64e6c43..b351eb0e 100644 --- a/src/main/java/com/juick/http/www/PM.java +++ b/src/main/java/com/juick/http/www/PM.java @@ -25,14 +25,12 @@ import com.juick.xmpp.Stream; import com.juick.xmpp.extensions.JuickMessage; import org.springframework.jdbc.core.JdbcTemplate; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.Connection; -import java.util.ArrayList; -import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; /** * @@ -74,7 +72,7 @@ public class PM { out.println("
"); out.println("