diff options
author | Vitaly Takmazov | 2016-12-20 14:28:00 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-20 14:28:00 +0300 |
commit | 3859c9616d0a7a04e68427d173b863161b818140 (patch) | |
tree | cba4d1aea88b7ce0d94cbc30fc05f765c9faaa15 /juick-crosspost/src/main/java/com/juick | |
parent | 8b02f969d3a09e39557474eb90ec821d550e3b1b (diff) |
StringUtils.EMPTY
Diffstat (limited to 'juick-crosspost/src/main/java/com/juick')
-rw-r--r-- | juick-crosspost/src/main/java/com/juick/components/Crosspost.java | 16 |
1 files changed, 8 insertions, 8 deletions
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<String, String> tokens = crosspostService.getVkTokens(jmsg.getUser().getUid()).orElse(Pair.of("", "")); + Pair<String, String> 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<String, String> tokens = crosspostService.getTwitterTokens(jmsg.getUser().getUid()).orElse(Pair.of("", "")); + Pair<String, String> 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 + " "; } |