X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommand.java;h=31308be29e5998e0dcd9b2e8f6fc3fe4e2d7acd2;hb=0ae4db6f172db754840808595719c595dcc7b7bc;hp=01b52aac9f354178336af7a8316fc469b8aa19f2;hpb=8d49fb185ee26853262a12f6d419ef2e39c1116c;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java index 01b52aa..31308be 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java @@ -18,7 +18,6 @@ package net.pterodactylus.sone.fcp; import static com.google.common.base.Optional.fromNullable; -import static com.google.common.base.Optional.of; import static net.pterodactylus.sone.data.Identified.GET_ID; import net.pterodactylus.sone.core.Core; @@ -47,9 +46,6 @@ public class CreatePostCommand extends AbstractSoneCommand { super(core, true); } - /** - * {@inheritDoc} - */ @Override public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { Sone sone = getSone(parameters, "Sone", true); @@ -61,7 +57,7 @@ public class CreatePostCommand extends AbstractSoneCommand { if (sone.equals(recipient)) { return new ErrorResponse("Sone and Recipient must not be the same."); } - Post post = sone.newPostBuilder().to(fromNullable(recipient).transform(GET_ID)).withText(text).build(of(getCore().postCreated())); + Post post = sone.newPostBuilder().to(fromNullable(recipient).transform(GET_ID)).withText(text).build(getCore().postCreated()); return new Response("PostCreated", new SimpleFieldSetBuilder().put("Post", post.getId()).get()); }