From fdb4895ff440a569367a43d4316734c88c6ee6d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 26 Jan 2013 01:02:15 +0100 Subject: [PATCH 1/1] Check correctly for the presence of a post. --- src/main/java/net/pterodactylus/sone/web/SearchPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/web/SearchPage.java b/src/main/java/net/pterodactylus/sone/web/SearchPage.java index 6cb2c0c..e979a49 100644 --- a/src/main/java/net/pterodactylus/sone/web/SearchPage.java +++ b/src/main/java/net/pterodactylus/sone/web/SearchPage.java @@ -323,7 +323,7 @@ public class SearchPage extends SoneTemplatePage { */ private String getPostId(String phrase) { String postId = phrase.startsWith("post://") ? phrase.substring(7) : phrase; - return (webInterface.getCore().getPost(postId) != null) ? postId : null; + return (webInterface.getCore().getPost(postId).isPresent()) ? postId : null; } /** -- 2.7.4