From: David ‘Bombe’ Roden Date: Tue, 5 Nov 2013 21:42:31 +0000 (+0100) Subject: Check for correct objects. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=95638f1b175255f63ca23f8292d71b8ee1a93de7;p=Sone.git Check for correct objects. --- diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java index bdc247e..01b7839 100644 --- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java +++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java @@ -312,7 +312,7 @@ public class MemoryDatabase extends AbstractService implements Database { public boolean isLiked(Post post, Sone sone) { lock.readLock().lock(); try { - return likedPostsBySone.containsEntry(sone, post); + return likedPostsBySone.containsEntry(sone.getId(), post.getId()); } finally { lock.readLock().unlock(); }