From 3859c9616d0a7a04e68427d173b863161b818140 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Dec 2016 14:28:00 +0300 Subject: StringUtils.EMPTY --- juick-xmpp/src/main/java/com/juick/components/XMPPServer.java | 5 +++-- juick-xmpp/src/main/java/com/juick/components/s2s/JuickBot.java | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'juick-xmpp/src') diff --git a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java index e057a9ea..ac2c9ec8 100644 --- a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java +++ b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java @@ -7,6 +7,7 @@ import com.juick.xmpp.Stanza; import com.juick.xmpp.StanzaChild; import com.juick.xmpp.extensions.JuickMessage; import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -71,8 +72,8 @@ public class XMPPServer implements AutoCloseable { int s2sPort = NumberUtils.toInt(env.getProperty("s2s_port"), 5269); keystore = env.getProperty("keystore"); keystorePassword = env.getProperty("keystore_password"); - brokenSSLhosts = Arrays.asList(env.getProperty("broken_ssl_hosts", "").split(",")); - bannedHosts = Arrays.asList(env.getProperty("banned_hosts", "").split(",")); + brokenSSLhosts = Arrays.asList(env.getProperty("broken_ssl_hosts", StringUtils.EMPTY).split(",")); + bannedHosts = Arrays.asList(env.getProperty("banned_hosts", StringUtils.EMPTY).split(",")); jid = new JID(env.getProperty("xmppbot_jid")); boolean disabled = BooleanUtils.toBoolean(env.getProperty("xmpp_disabled", "false")); diff --git a/juick-xmpp/src/main/java/com/juick/components/s2s/JuickBot.java b/juick-xmpp/src/main/java/com/juick/components/s2s/JuickBot.java index 304d365e..eec9b8e2 100644 --- a/juick-xmpp/src/main/java/com/juick/components/s2s/JuickBot.java +++ b/juick-xmpp/src/main/java/com/juick/components/s2s/JuickBot.java @@ -8,6 +8,7 @@ import com.juick.xmpp.Presence; import com.juick.xmpp.Stanza; import com.juick.xmpp.extensions.Error; import com.juick.xmpp.extensions.JuickMessage; +import org.apache.commons.lang3.StringUtils; import javax.inject.Inject; import java.util.List; @@ -145,8 +146,8 @@ public class JuickBot implements StanzaListener { String username = msg.to.Username.toLowerCase(); - User user_from = null; - String signuphash = ""; + User user_from; + String signuphash = StringUtils.EMPTY; user_from = xmpp.userService.getUserByJID(msg.from.Bare()); if (user_from == null) { signuphash = xmpp.userService.getSignUpHashByJID(msg.from.Bare()); @@ -354,7 +355,7 @@ public class JuickBot implements StanzaListener { List blusers = xmpp.userService.getUserBLUsers(user_from.getUid()); List bltags = xmpp.tagService.getUserBLTags(user_from.getUid()); - String txt = ""; + String txt = StringUtils.EMPTY; if (bltags.size() > 0) { for (String bltag : bltags) { txt += "*" + bltag + "\n"; -- cgit v1.2.3