Don’t try to get post if it doesn’t exist!
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Jul 2013 06:05:44 +0000 (08:05 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Jul 2013 06:05:44 +0000 (08:05 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 9b60076..7b4bc4b 100644 (file)
@@ -603,7 +603,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                synchronized (bookmarkedPosts) {
                        for (String bookmarkedPostId : bookmarkedPosts) {
                                Optional<Post> post = getPost(bookmarkedPostId);
-                               if (!post.isPresent()) {
+                               if (post.isPresent()) {
                                        posts.add(post.get());
                                }
                        }