From 05005ae056950675002f5bb4319a42cd725b6800 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 29 Oct 2016 00:29:27 +0200 Subject: [PATCH] Shorten bloated code --- src/main/java/net/pterodactylus/sone/text/SoneTextParser.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java b/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java index 88efd16..ee89c05 100644 --- a/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java +++ b/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java @@ -394,8 +394,7 @@ public class SoneTextParser implements Parser { } private void renderHttpLink(PartContainer parts, String link, LinkType linkType) { - String name; - name = link.substring(linkType == LinkType.HTTP ? 7 : 8); + String name = link.substring(linkType == LinkType.HTTP ? 7 : 8); int firstSlash = name.indexOf('/'); int lastSlash = name.lastIndexOf('/'); if ((lastSlash - firstSlash) > 3) { -- 2.7.4