From 3e87cc6a73fbfc165f81d5f7a3d7d1f76e7feb9a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 1 Nov 2017 01:57:08 +0300 Subject: www: /post should not throw if img or attach is present --- juick-server-jdbc/src/main/java/com/juick/database/MySqlUpdater.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-server-jdbc/src/main') diff --git a/juick-server-jdbc/src/main/java/com/juick/database/MySqlUpdater.java b/juick-server-jdbc/src/main/java/com/juick/database/MySqlUpdater.java index 3d425648..69cde40b 100644 --- a/juick-server-jdbc/src/main/java/com/juick/database/MySqlUpdater.java +++ b/juick-server-jdbc/src/main/java/com/juick/database/MySqlUpdater.java @@ -17,6 +17,7 @@ package com.juick.database; +import org.apache.commons.codec.CharEncoding; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -68,7 +69,7 @@ public class MySqlUpdater { InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(updateSqlResource); ) { if (is != null) { - String content = IOUtils.toString(is, StandardCharsets.UTF_8); + String content = IOUtils.toString(is, CharEncoding.UTF_8); if (StringUtils.isNotEmpty(content)) { String[] sqlArray = content.split(";"); if (sqlArray.length > 0) { -- cgit v1.2.3