From 02a0693e0e7af73a583dc5c109c17ab47c58fa32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 10 Oct 2011 21:43:06 +0200 Subject: [PATCH] Allow empty values for profile fields. --- src/main/java/net/pterodactylus/sone/core/SoneDownloader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.7.4