From 3859c9616d0a7a04e68427d173b863161b818140 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Dec 2016 14:28:00 +0300 Subject: StringUtils.EMPTY --- .../src/main/java/com/juick/components/Crosspost.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'juick-crosspost/src/main/java/com/juick/components') diff --git a/juick-crosspost/src/main/java/com/juick/components/Crosspost.java b/juick-crosspost/src/main/java/com/juick/components/Crosspost.java index 5e28c71e..7cf4ad3e 100644 --- a/juick-crosspost/src/main/java/com/juick/components/Crosspost.java +++ b/juick-crosspost/src/main/java/com/juick/components/Crosspost.java @@ -73,16 +73,16 @@ public class Crosspost implements AutoCloseable { this.crosspostService = crosspostService; - twitter_consumer_key = env.getProperty("twitter_consumer_key", ""); - twitter_consumer_secret = env.getProperty("twitter_consumer_secret", ""); + twitter_consumer_key = env.getProperty("twitter_consumer_key", StringUtils.EMPTY); + twitter_consumer_secret = env.getProperty("twitter_consumer_secret", StringUtils.EMPTY); crosspostJid = env.getProperty("crosspost_jid", "crosspost.juick.local"); - password = env.getProperty("xmpp_password", ""); + password = env.getProperty("xmpp_password", StringUtils.EMPTY); port = NumberUtils.toInt(env.getProperty("xmpp_port"), 5347); } public static String percentEncode(final String s) { - String ret = ""; + String ret = StringUtils.EMPTY; try { ret = URLEncoder.encode(s, CharEncoding.UTF_8).replace("+", "%20").replace("*", "%2A").replace("%7E", "~"); } catch (UnsupportedEncodingException e) { @@ -125,7 +125,7 @@ public class Crosspost implements AutoCloseable { } public boolean facebookPost(final com.juick.Message jmsg) { - String token = crosspostService.getFacebookToken(jmsg.getUser().getUid()).orElse(""); + String token = crosspostService.getFacebookToken(jmsg.getUser().getUid()).orElse(StringUtils.EMPTY); if (token.isEmpty()) { return false; } @@ -167,7 +167,7 @@ public class Crosspost implements AutoCloseable { } public boolean vkontaktePost(final com.juick.Message jmsg) { - Pair tokens = crosspostService.getVkTokens(jmsg.getUser().getUid()).orElse(Pair.of("", "")); + Pair tokens = crosspostService.getVkTokens(jmsg.getUser().getUid()).orElse(Pair.of(StringUtils.EMPTY, StringUtils.EMPTY)); if (tokens.getLeft().isEmpty() || tokens.getRight().isEmpty()) { return false; } @@ -204,7 +204,7 @@ public class Crosspost implements AutoCloseable { } public boolean twitterPost(final com.juick.Message jmsg) { - Pair tokens = crosspostService.getTwitterTokens(jmsg.getUser().getUid()).orElse(Pair.of("", "")); + Pair tokens = crosspostService.getTwitterTokens(jmsg.getUser().getUid()).orElse(Pair.of(StringUtils.EMPTY, StringUtils.EMPTY)); if (tokens.getLeft().isEmpty() || tokens.getRight().isEmpty()) { return false; } @@ -285,7 +285,7 @@ public class Crosspost implements AutoCloseable { } public String getMessageHashTags(final com.juick.Message jmsg) { - String hashtags = ""; + String hashtags = StringUtils.EMPTY; for (Tag tag : jmsg.getTags()) { hashtags += "#" + tag + " "; } -- cgit v1.2.3