diff options
author | Vitaly Takmazov | 2024-02-09 16:02:43 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-02-09 16:02:43 +0300 |
commit | 8289a0b1097f02a99d62f4f7750e6b46a54a54fc (patch) | |
tree | be0e04b409757be58d5a39fbde93ce3d96b02142 /src/main/java/com/juick/util | |
parent | b11525961a8bf68355f3e4728375b209a91f6787 (diff) |
Append IDEA code suggestions
Diffstat (limited to 'src/main/java/com/juick/util')
-rw-r--r-- | src/main/java/com/juick/util/HttpUtils.java | 4 | ||||
-rw-r--r-- | src/main/java/com/juick/util/formatters/PlainTextFormatter.java | 2 |
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) { |