Fix check for valid Sone IDs. partial-rewrite
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 3 May 2013 23:21:05 +0000 (01:21 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 3 May 2013 23:21:05 +0000 (01:21 +0200)
src/main/java/net/pterodactylus/sone/web/SearchPage.java

index 4348434..6c9e15c 100644 (file)
@@ -310,7 +310,7 @@ public class SearchPage extends SoneTemplatePage {
         */
        private String getSoneId(String phrase) {
                String soneId = phrase.startsWith("sone://") ? phrase.substring(7) : phrase;
-               return (webInterface.getCore().getSone(soneId) != null) ? soneId : null;
+               return (webInterface.getCore().getSone(soneId).isPresent()) ? soneId : null;
        }
 
        /**