From 7eb3b141e5e4e719e1ef77ea06b6bac7610ae913 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 11 Jul 2016 10:16:36 +0300 Subject: cleanup sql --- juick-www/src/main/java/com/juick/www/Utils.java | 31 ------------------------ 1 file changed, 31 deletions(-) (limited to 'juick-www') diff --git a/juick-www/src/main/java/com/juick/www/Utils.java b/juick-www/src/main/java/com/juick/www/Utils.java index 8189bd82..ccb7cdd2 100644 --- a/juick-www/src/main/java/com/juick/www/Utils.java +++ b/juick-www/src/main/java/com/juick/www/Utils.java @@ -17,7 +17,6 @@ */ package com.juick.www; -import com.juick.*; import com.juick.User; import org.springframework.jdbc.core.JdbcTemplate; @@ -28,10 +27,6 @@ import javax.servlet.http.Part; import java.io.*; import java.net.URL; import java.net.URLConnection; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; import java.util.UUID; /** @@ -108,21 +103,6 @@ public class Utils { return null; } - public static void finishSQL(ResultSet rs, Statement stmt) { - if (rs != null) { - try { - rs.close(); - } catch (SQLException e) { - } - } - if (stmt != null) { - try { - stmt.close(); - } catch (SQLException e) { - } - } - } - public static void replyJSON(HttpServletRequest request, HttpServletResponse response, String json) throws IOException { response.setContentType("application/json; charset=UTF-8"); response.setHeader("Access-Control-Allow-Origin", "*"); @@ -146,17 +126,6 @@ public class Utils { } } - public static String convertArray2String(ArrayList mids) { - String q = ""; - for (int i = 0; i < mids.size(); i++) { - if (i > 0) { - q += ","; - } - q += mids.get(i); - } - return q; - } - public static String encodeHTML(String str) { return str.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("'", "'").replaceAll("\"", """).replaceAll("\n", " "); } -- cgit v1.2.3