Use isFreenetLink() attribute on LinkType
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 20 Jul 2015 20:34:47 +0000 (22:34 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 20 Jul 2015 20:34:47 +0000 (22:34 +0200)
src/main/java/net/pterodactylus/sone/text/SoneTextParser.java

index 62fc7dc..7bdcf7a 100644 (file)
@@ -220,7 +220,7 @@ public class SoneTextParser implements Parser<SoneTextParserContext> {
                                                continue;
                                        }
 
-                                       if ((linkType == LinkType.KSK) || (linkType == LinkType.CHK) || (linkType == LinkType.SSK) || (linkType == LinkType.USK)) {
+                                       if (linkType.isFreenetLink()) {
                                                FreenetURI uri;
                                                if (name.indexOf('?') > -1) {
                                                        name = name.substring(0, name.indexOf('?'));