aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main/java/com/juick/components
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick/components')
-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";