X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FAbstractSoneCommand.java;h=19c1979a9754efbffa293bc2963b9ec2040d4502;hb=0ae4db6f172db754840808595719c595dcc7b7bc;hp=d71ffc4481125a6327909a0b4199d4b841023dbe;hpb=6f019de1d4d9742981d851ac3c9097cca8bff58e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java b/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java index d71ffc4..19c1979 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java @@ -33,12 +33,12 @@ import net.pterodactylus.sone.freenet.fcp.Command; import net.pterodactylus.sone.freenet.fcp.FcpException; import net.pterodactylus.sone.template.SoneAccessor; -import com.google.common.base.Optional; -import com.google.common.collect.Collections2; - import freenet.node.FSParseException; import freenet.support.SimpleFieldSet; +import com.google.common.base.Optional; +import com.google.common.collect.Collections2; + /** * Abstract base implementation of a {@link Command} with Sone-related helper * methods. @@ -186,7 +186,7 @@ public abstract class AbstractSoneCommand extends AbstractCommand { protected Post getPost(SimpleFieldSet simpleFieldSet, String parameterName) throws FcpException { try { String postId = simpleFieldSet.getString(parameterName); - Optional post = core.getPost(postId); + Optional post = core.getDatabase().getPost(postId); if (!post.isPresent()) { throw new FcpException("Could not load post from “" + postId + "”."); } @@ -399,9 +399,6 @@ public abstract class AbstractSoneCommand extends AbstractCommand { // OBJECT METHODS // - /** - * {@inheritDoc} - */ @Override public String toString() { return getClass().getName() + "[writeAccess=" + writeAccess + "]";