X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2Fimpl%2FDefaultPostBuilder.java;h=f73245d22566c57c36439d562bed409bd11d25b8;hb=15b175ec7ed0423bc5a58d1306062458ab0b2a04;hp=a07f144f918eb3cebc27087c209c69773e6175cd;hpb=cf032630b167166215f45d8ae2e5147e1934c223;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/data/impl/DefaultPostBuilder.java b/src/main/java/net/pterodactylus/sone/data/impl/DefaultPostBuilder.java
index a07f144..f73245d 100644
--- a/src/main/java/net/pterodactylus/sone/data/impl/DefaultPostBuilder.java
+++ b/src/main/java/net/pterodactylus/sone/data/impl/DefaultPostBuilder.java
@@ -17,8 +17,6 @@
package net.pterodactylus.sone.data.impl;
-import java.util.UUID;
-
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.database.Database;
import net.pterodactylus.sone.database.PostBuilder;
@@ -26,7 +24,7 @@ import net.pterodactylus.sone.database.PostBuilder;
import com.google.common.base.Optional;
/**
- * {@link PostBuilder} implementation that creates {@link PostImpl} objects.
+ * {@link PostBuilder} implementation that creates {@link DefaultPost} objects.
*
* @author David âBombeâ Roden
*/
@@ -41,11 +39,10 @@ public class DefaultPostBuilder extends AbstractPostBuilder {
super(database, soneId);
}
- /** {@inheritDoc} */
@Override
public Post build(Optional postCreated) {
validate();
- PostImpl post = new PostImpl(database, randomId ? UUID.randomUUID().toString() : id, senderId, recipientId.orNull(), currentTime ? System.currentTimeMillis() : time, text);
+ DefaultPost post = new DefaultPost(database, getId(), senderId, recipientId.orNull(), getTime(), text);
if (postCreated.isPresent()) {
postCreated.get().postCreated(post);
}