From: David ‘Bombe’ Roden Date: Tue, 30 Jul 2019 18:04:44 +0000 (+0200) Subject: ⚡️ Remove unnecessary database operation X-Git-Tag: v81^2~155 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c6c4802b4e389b4457adf0827efafca1cd7d1e9c;p=Sone.git ⚡️ Remove unnecessary database operation --- diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryPostBuilder.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryPostBuilder.java index dea3449..3c4b16a 100644 --- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryPostBuilder.java +++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryPostBuilder.java @@ -51,9 +51,7 @@ class MemoryPostBuilder extends AbstractPostBuilder { @Override public Post build() throws IllegalStateException { validate(); - Post post = new MemoryPost(database, soneProvider, randomId ? UUID.randomUUID().toString() : id, senderId, recipientId, currentTime ? System.currentTimeMillis() : time, text); - post.setKnown(database.isPostKnown(post)); - return post; + return new MemoryPost(database, soneProvider, randomId ? UUID.randomUUID().toString() : id, senderId, recipientId, currentTime ? System.currentTimeMillis() : time, text); } }