aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src
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-xmpp/src
parent8b02f969d3a09e39557474eb90ec821d550e3b1b (diff)
StringUtils.EMPTY
Diffstat (limited to 'juick-xmpp/src')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/XMPPServer.java5
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/s2s/JuickBot.java7
2 files changed, 7 insertions, 5 deletions
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<User> blusers = xmpp.userService.getUserBLUsers(user_from.getUid());
List<String> bltags = xmpp.tagService.getUserBLTags(user_from.getUid());
- String txt = "";
+ String txt = StringUtils.EMPTY;
if (bltags.size() > 0) {
for (String bltag : bltags) {
txt += "*" + bltag + "\n";