From: David ‘Bombe’ Roden Date: Mon, 10 Oct 2011 19:43:06 +0000 (+0200) Subject: Allow empty values for profile fields. X-Git-Tag: 0.7.3^2~24 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=02a0693e0e7af73a583dc5c109c17ab47c58fa32;p=Sone.git Allow empty values for profile fields. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index db26d80..014e252 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -336,8 +336,8 @@ public class SoneDownloader extends AbstractService { if (profileFieldsXml != null) { for (SimpleXML fieldXml : profileFieldsXml.getNodes("field")) { String fieldName = fieldXml.getValue("field-name", null); - String fieldValue = fieldXml.getValue("field-value", null); - if ((fieldName == null) || (fieldValue == null)) { + String fieldValue = fieldXml.getValue("field-value", ""); + if (fieldName == null) { logger.log(Level.WARNING, "Downloaded profile field for Sone %s with missing data! Name: %s, Value: %s", new Object[] { sone, fieldName, fieldValue }); return null; }