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/test/java/com/juick/json/MessageSerializer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/test/java/com') diff --git a/src/test/java/com/juick/json/MessageSerializer.java b/src/test/java/com/juick/json/MessageSerializer.java index 7ed060dd..6f0d462f 100644 --- a/src/test/java/com/juick/json/MessageSerializer.java +++ b/src/test/java/com/juick/json/MessageSerializer.java @@ -21,6 +21,7 @@ import com.juick.Message; import com.juick.Photo; import com.juick.Tag; import com.juick.util.DateFormattersHolder; +import org.apache.commons.lang3.StringUtils; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -124,7 +125,7 @@ public class MessageSerializer extends JSONSerializer { } if (msg.getAttachmentType() != null) { json.put("attach", msg.getAttachmentType()); - String fname = msg.getMid() + (msg.getRid() > 0 ? "-" + msg.getRid() : "") + "." + msg.getAttachmentType(); + String fname = msg.getMid() + (msg.getRid() > 0 ? "-" + msg.getRid() : StringUtils.EMPTY) + "." + msg.getAttachmentType(); JSONObject photo = new JSONObject(); String protocol = getUriScheme() == URIScheme.Plain ? "http:" : "https:"; photo.put("thumbnail", protocol + "//i.juick.com/ps/" + fname); -- cgit v1.2.3