Fix javadoc.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 7545d98..c986d71 100644 (file)
@@ -525,6 +525,7 @@ public class Core implements IdentityListener, UpdateListener {
         * @return {@code true} if the target Sone is trusted by the origin Sone
         */
        public boolean isSoneTrusted(Sone origin, Sone target) {
+               Validation.begin().isNotNull("Origin", origin).isNotNull("Target", target).check().isInstanceOf("Origin’s OwnIdentity", origin.getIdentity(), OwnIdentity.class).check();
                return trustedIdentities.containsKey(origin.getIdentity()) && trustedIdentities.get(origin.getIdentity()).contains(target.getIdentity());
        }
 
@@ -533,7 +534,7 @@ public class Core implements IdentityListener, UpdateListener {
         *
         * @param postId
         *            The ID of the post to get
-        * @return The post, or {@code null} if there is no such post
+        * @return The post with the given ID, or a new post with the given ID
         */
        public Post getPost(String postId) {
                return getPost(postId, true);