aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Main.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-20 14:28:00 +0300
committerGravatar Vitaly Takmazov2016-12-20 14:28:00 +0300
commit3859c9616d0a7a04e68427d173b863161b818140 (patch)
treecba4d1aea88b7ce0d94cbc30fc05f765c9faaa15 /juick-www/src/main/java/com/juick/www/Main.java
parent8b02f969d3a09e39557474eb90ec821d550e3b1b (diff)
StringUtils.EMPTY
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Main.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Main.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java
index 077a3e32..4fb13290 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -23,6 +23,7 @@ import com.mitchellbosecke.pebble.error.PebbleException;
import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.CharEncoding;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.jdbc.core.JdbcTemplate;
import rocks.xmpp.addr.Jid;
@@ -92,7 +93,7 @@ public class Main extends HttpServlet {
boolean isXmppDisabled = BooleanUtils.toBoolean(conf.getProperty("xmpp_disabled"));
if (!isXmppDisabled) {
setupXmppComponent(Jid.of(conf.getProperty("www_xmpp_jid", "www.juick.local")),
- conf.getProperty("xmpp_password"), NumberUtils.toInt(conf.getProperty("xmpp_port", ""), 5347));
+ conf.getProperty("xmpp_password"), NumberUtils.toInt(conf.getProperty("xmpp_port", StringUtils.EMPTY), 5347));
}
twitterAuth = new TwitterAuth(conf.getProperty("twitter_consumer_key"),
conf.getProperty("twitter_consumer_secret"));
@@ -102,8 +103,8 @@ public class Main extends HttpServlet {
String imgPath = conf.getProperty("img_path", "/var/www/juick.com/i/");
pagesNewMessage = new NewMessage(tmpDir, imgPath);
settings = new Settings(imgPath);
- String sapeUser = conf.getProperty("sape_user", "");
- if (!Objects.equals(sapeUser, "")) {
+ String sapeUser = conf.getProperty("sape_user", StringUtils.EMPTY);
+ if (!Objects.equals(sapeUser, StringUtils.EMPTY)) {
PageTemplates.sape = new Sape(sapeUser, "juick.com", 2000, 3600);
} else {
log("Sape is not initialized");
@@ -305,7 +306,7 @@ public class Main extends HttpServlet {
}
}
} else if (user != null && !user.isBanned()) {
- Utils.sendPermanentRedirect(response, "/" + user.getName() + "/" + (uriparts.length > 2 ? uriparts[2] : ""));
+ Utils.sendPermanentRedirect(response, "/" + user.getName() + "/" + (uriparts.length > 2 ? uriparts[2] : StringUtils.EMPTY));
} else {
Errors.doGet404(sql, request, response);
}