Make post returned by post reply optional.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / impl / PostReplyImpl.java
index 361a2e9..fdedaa0 100644 (file)
@@ -21,6 +21,8 @@ import net.pterodactylus.sone.core.PostProvider;
 import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.PostReply;
 
+import com.google.common.base.Optional;
+
 /**
  * Simple {@link PostReply} implementation.
  *
@@ -53,10 +55,18 @@ public class PostReplyImpl extends ReplyImpl<PostReply> implements PostReply {
        //
 
        /**
+        * {@inheritDocs}
+        */
+       @Override
+       public String getPostId() {
+               return postId;
+       }
+
+       /**
         * {@inheritDoc}
         */
        @Override
-       public Post getPost() {
+       public Optional<Post> getPost() {
                return postProvider.getPost(postId);
        }