Rename fetch action methods
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneParser.java
index ae600a6..fdbd9ae 100644 (file)
@@ -38,7 +38,7 @@ import org.w3c.dom.Document;
  */
 public class SoneParser {
 
-       private static final Logger logger = getLogger("Sone.Parser");
+       private static final Logger logger = getLogger(SoneParser.class.getName());
        private static final int MAX_PROTOCOL_VERSION = 0;
        private final Core core;
 
@@ -261,7 +261,6 @@ public class SoneParser {
                                String parentId = albumXml.getValue("parent", null);
                                String title = albumXml.getValue("title", null);
                                String description = albumXml.getValue("description", "");
-                               String albumImageId = albumXml.getValue("album-image", null);
                                if ((id == null) || (title == null)) {
                                        logger.log(Level.WARNING, String.format("Downloaded Sone %s contains invalid album!", sone));
                                        return null;
@@ -315,7 +314,6 @@ public class SoneParser {
                                                allImages.put(imageId, image);
                                        }
                                }
-                               album.modify().setAlbumImage(albumImageId).update();
                        }
                }
 
@@ -325,16 +323,13 @@ public class SoneParser {
                }
 
                /* okay, apparently everything was parsed correctly. Now import. */
-               /* atomic setter operation on the Sone. */
-               synchronized (sone) {
-                       sone.setProfile(profile);
-                       sone.setPosts(posts);
-                       sone.setReplies(replies);
-                       sone.setLikePostIds(likedPostIds);
-                       sone.setLikeReplyIds(likedReplyIds);
-                       for (Album album : topLevelAlbums) {
-                               sone.getRootAlbum().addAlbum(album);
-                       }
+               sone.setProfile(profile);
+               sone.setPosts(posts);
+               sone.setReplies(replies);
+               sone.setLikePostIds(likedPostIds);
+               sone.setLikeReplyIds(likedReplyIds);
+               for (Album album : topLevelAlbums) {
+                       sone.getRootAlbum().addAlbum(album);
                }
 
                return sone;