Remove unnecessary warning suppression.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index fa98bbb..fc362a6 100644 (file)
@@ -542,6 +542,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                        });
                }
        }
+
        /**
         * Returns a post reply builder.
         *
@@ -1374,11 +1375,21 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                                knownSones.add(friend);
                        }
                }
+               synchronized (this.posts) {
+                       for (Post post : posts) {
+                               this.posts.put(post.getId(), post);
+                       }
+               }
                synchronized (knownPosts) {
                        for (Post post : posts) {
                                knownPosts.add(post.getId());
                        }
                }
+               synchronized (this.replies) {
+                       for (PostReply postReply : replies) {
+                               this.replies.put(postReply.getId(), postReply);
+                       }
+               }
                synchronized (knownReplies) {
                        for (PostReply reply : replies) {
                                knownReplies.add(reply.getId());
@@ -2087,7 +2098,6 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
        /**
         * Loads the configuration.
         */
-       @SuppressWarnings("unchecked")
        private void loadConfiguration() {
                /* create options. */
                options.addIntegerOption("InsertionDelay", new DefaultOption<Integer>(60, new IntegerRangePredicate(0, Integer.MAX_VALUE), new OptionWatcher<Integer>() {