⚡️ Remove unnecessary database operation
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 30 Jul 2019 17:48:08 +0000 (19:48 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 30 Jul 2019 17:48:38 +0000 (19:48 +0200)
src/main/java/net/pterodactylus/sone/database/memory/MemoryPostReplyBuilder.java

index 3bcfe33..352dddb 100644 (file)
@@ -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);
        }
 
 }