if (postsXml == null) {
/* TODO - mark Sone as bad. */
logger.log(Level.WARNING, String.format("Downloaded Sone %s has no posts!", sone));
if (postsXml == null) {
/* TODO - mark Sone as bad. */
logger.log(Level.WARNING, String.format("Downloaded Sone %s has no posts!", sone));
if (repliesXml == null) {
/* TODO - mark Sone as bad. */
logger.log(Level.WARNING, String.format("Downloaded Sone %s has no replies!", sone));
if (repliesXml == null) {
/* TODO - mark Sone as bad. */
logger.log(Level.WARNING, String.format("Downloaded Sone %s has no replies!", sone));
if (likePostIdsXml == null) {
/* TODO - mark Sone as bad. */
logger.log(Level.WARNING, String.format("Downloaded Sone %s has no post likes!", sone));
if (likePostIdsXml == null) {
/* TODO - mark Sone as bad. */
logger.log(Level.WARNING, String.format("Downloaded Sone %s has no post likes!", sone));
if (likeReplyIdsXml == null) {
/* TODO - mark Sone as bad. */
logger.log(Level.WARNING, String.format("Downloaded Sone %s has no reply likes!", sone));
if (likeReplyIdsXml == null) {
/* TODO - mark Sone as bad. */
logger.log(Level.WARNING, String.format("Downloaded Sone %s has no reply likes!", sone));
- Map<String, Image> allImages = new HashMap<String, Image>();
- List<Album> topLevelAlbums = new ArrayList<Album>();
+ Map<String, Image> allImages = new HashMap<>();
+ List<Album> topLevelAlbums = new ArrayList<>();
+ Map<String, Album> allAlbums = new HashMap<>();
if (albumsXml != null) {
for (SimpleXML albumXml : albumsXml.getNodes("album")) {
String id = albumXml.getValue("id", null);
if (albumsXml != null) {
for (SimpleXML albumXml : albumsXml.getNodes("album")) {
String id = albumXml.getValue("id", null);
if (parent == null) {
logger.log(Level.WARNING, String.format("Downloaded Sone %s has album with invalid parent!", sone));
return null;
if (parent == null) {
logger.log(Level.WARNING, String.format("Downloaded Sone %s has album with invalid parent!", sone));
return null;
SimpleXML imagesXml = albumXml.getNode("images");
if (imagesXml != null) {
for (SimpleXML imageXml : imagesXml.getNodes("image")) {
SimpleXML imagesXml = albumXml.getNode("images");
if (imagesXml != null) {
for (SimpleXML imageXml : imagesXml.getNodes("image")) {