From: David ‘Bombe’ Roden Date: Tue, 30 Jul 2019 17:48:08 +0000 (+0200) Subject: ⚡️ Remove unnecessary database operation X-Git-Tag: v81^2~158 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a73c33904ed963cf8ecb0d4507c90e45ef83e407;p=Sone.git ⚡️ Remove unnecessary database operation --- diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryPostReplyBuilder.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryPostReplyBuilder.java index 3bcfe33..352dddb 100644 --- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryPostReplyBuilder.java +++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryPostReplyBuilder.java @@ -56,9 +56,7 @@ class MemoryPostReplyBuilder extends AbstractPostReplyBuilder { public PostReply build() throws IllegalStateException { validate(); - PostReply postReply = new MemoryPostReply(database, soneProvider, randomId ? UUID.randomUUID().toString() : id, senderId, currentTime ? System.currentTimeMillis() : time, text, postId); - postReply.setKnown(database.isPostReplyKnown(postReply)); - return postReply; + return new MemoryPostReply(database, soneProvider, randomId ? UUID.randomUUID().toString() : id, senderId, currentTime ? System.currentTimeMillis() : time, text, postId); } }