aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/util')
-rw-r--r--src/main/java/com/juick/util/HttpUtils.java4
-rw-r--r--src/main/java/com/juick/util/formatters/PlainTextFormatter.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/juick/util/HttpUtils.java b/src/main/java/com/juick/util/HttpUtils.java
index 46bb3e2d..22598977 100644
--- a/src/main/java/com/juick/util/HttpUtils.java
+++ b/src/main/java/com/juick/util/HttpUtils.java
@@ -97,7 +97,7 @@ public class HttpUtils {
try {
urlConn = url.openConnection();
} catch (IOException e) {
- logger.error(String.format("Failed open url: %s", url.toString()));
+ logger.error(String.format("Failed open url: %s", url));
throw e;
}
@@ -108,7 +108,7 @@ public class HttpUtils {
Files.copy(is, Paths.get(tmpDir, attachmentFName));
return URI.create(String.format("juick://%s", attachmentFName));
} catch (IOException e) {
- logger.error(String.format("Failed download image by url: %s", url.toString()), e);
+ logger.error(String.format("Failed download image by url: %s", url), e);
throw e;
}
}
diff --git a/src/main/java/com/juick/util/formatters/PlainTextFormatter.java b/src/main/java/com/juick/util/formatters/PlainTextFormatter.java
index b1b1a44a..9a885bca 100644
--- a/src/main/java/com/juick/util/formatters/PlainTextFormatter.java
+++ b/src/main/java/com/juick/util/formatters/PlainTextFormatter.java
@@ -67,7 +67,7 @@ public class PlainTextFormatter {
sb.append(txt);
}
return String.format("@%s:%s\n%s\n#%s (%s%s) %s",
- m.getUser().getName(), MessageUtils.getTagsString(m), sb.toString(), formatPostNumber(m), timeAgo, repliesCount, formatUrl(m));
+ m.getUser().getName(), MessageUtils.getTagsString(m), sb, formatPostNumber(m), timeAgo, repliesCount, formatUrl(m));
}
public static String formatUrl(Message jmsg) {