X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneDownloader.java;h=8d0d1f29ffa715586c9ea7b4e742cdb6d996dd15;hb=bd7db46eadcf5ec44550722966b04bb77a32fd76;hp=a691440fad531f4eb11c2b6b0864776869a3f3b5;hpb=ef78e13c75f807a069becc6a62fb78d3c4e1a337;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index a691440..8d0d1f2 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -17,7 +17,6 @@ package net.pterodactylus.sone.core; -import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.util.ArrayList; @@ -184,8 +183,8 @@ public class SoneDownloader extends AbstractService { } } return parsedSone; - } catch (IOException ioe1) { - logger.log(Level.WARNING, "Could not parse Sone from " + requestUri + "!", ioe1); + } catch (Exception e1) { + logger.log(Level.WARNING, "Could not parse Sone from " + requestUri + "!", e1); } finally { Closer.close(soneInputStream); soneBucket.free(); @@ -451,10 +450,10 @@ public class SoneDownloader extends AbstractService { String imageCreationTimeString = imageXml.getValue("creation-time", null); String imageKey = imageXml.getValue("key", null); String imageTitle = imageXml.getValue("title", null); - String imageDescription = imageXml.getValue("description", null); + String imageDescription = imageXml.getValue("description", ""); String imageWidthString = imageXml.getValue("width", null); String imageHeightString = imageXml.getValue("height", null); - if ((imageId == null) || (imageCreationTimeString == null) || (imageKey == null) || (imageTitle == null) || (imageDescription == null) || (imageWidthString == null) || (imageHeightString == null)) { + if ((imageId == null) || (imageCreationTimeString == null) || (imageKey == null) || (imageTitle == null) || (imageWidthString == null) || (imageHeightString == null)) { logger.log(Level.WARNING, "Downloaded Sone %s contains invalid images!", new Object[] { sone }); return null; }