Remove unnecessary synchronization.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / impl / SoneImpl.java
index eb2fc6e..142f4a2 100644 (file)
@@ -357,34 +357,7 @@ public class SoneImpl implements LocalSone {
         * @return All posts of this Sone
         */
        public List<Post> getPosts() {
-               synchronized (this) {
-                       return FluentIterable.from(posts).toSortedList(Post.TIME_COMPARATOR);
-               }
-       }
-
-       /**
-        * Adds the given post to this Sone. The post will not be added if its {@link
-        * Post#getSone() Sone} is not this Sone.
-        *
-        * @param post
-        *              The post to add
-        */
-       public void addPost(Post post) {
-               if (post.getSone().equals(this) && posts.add(post)) {
-                       logger.log(Level.FINEST, String.format("Adding %s to ā€œ%sā€.", post, getName()));
-               }
-       }
-
-       /**
-        * Removes the given post from this Sone.
-        *
-        * @param post
-        *              The post to remove
-        */
-       public void removePost(Post post) {
-               if (post.getSone().equals(this)) {
-                       posts.remove(post);
-               }
+               return FluentIterable.from(posts).toSortedList(Post.TIME_COMPARATOR);
        }
 
        /**