Remove @author tags
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / AbstractSoneCommand.java
index 93b5d32..23f63a3 100644 (file)
@@ -40,8 +40,6 @@ import com.google.common.base.Optional;
 /**
  * Abstract base implementation of a {@link Command} with Sone-related helper
  * methods.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
 public abstract class AbstractSoneCommand extends AbstractCommand {
 
@@ -184,11 +182,11 @@ public abstract class AbstractSoneCommand extends AbstractCommand {
        protected Post getPost(SimpleFieldSet simpleFieldSet, String parameterName) throws FcpException {
                try {
                        String postId = simpleFieldSet.getString(parameterName);
-                       Optional<Post> post = core.getPost(postId);
-                       if (!post.isPresent()) {
+                       Post post = core.getPost(postId);
+                       if (post == null) {
                                throw new FcpException("Could not load post from “" + postId + "”.");
                        }
-                       return post.get();
+                       return post;
                } catch (FSParseException fspe1) {
                        throw new FcpException("Could not post ID from “" + parameterName + "”.", fspe1);
                }
@@ -210,11 +208,11 @@ public abstract class AbstractSoneCommand extends AbstractCommand {
        protected PostReply getReply(SimpleFieldSet simpleFieldSet, String parameterName) throws FcpException {
                try {
                        String replyId = simpleFieldSet.getString(parameterName);
-                       Optional<PostReply> reply = core.getPostReply(replyId);
-                       if (!reply.isPresent()) {
+                       PostReply reply = core.getPostReply(replyId);
+                       if (reply == null) {
                                throw new FcpException("Could not load reply from “" + replyId + "”.");
                        }
-                       return reply.get();
+                       return reply;
                } catch (FSParseException fspe1) {
                        throw new FcpException("Could not reply ID from “" + parameterName + "”.", fspe1);
                }