Allow empty values for profile fields.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 10 Oct 2011 19:43:06 +0000 (21:43 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 10 Oct 2011 19:43:06 +0000 (21:43 +0200)
src/main/java/net/pterodactylus/sone/core/SoneDownloader.java

index db26d80..014e252 100644 (file)
@@ -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;
                                }