From: David ‘Bombe’ Roden Date: Fri, 28 Oct 2016 22:29:27 +0000 (+0200) Subject: Shorten bloated code X-Git-Tag: 0.9.7^2~467 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=05005ae056950675002f5bb4319a42cd725b6800;p=Sone.git Shorten bloated code --- 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) {