From: David ‘Bombe’ Roden Date: Wed, 13 Apr 2011 18:32:18 +0000 (+0200) Subject: Default description to an empty string. X-Git-Tag: 0.7^2~2^2~81 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=65160b6efab570b55aabb759c78d10aaef0ec2f7 Default description to an empty string. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index a691440..6f89fe5 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -451,10 +451,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; }