From: David ‘Bombe’ Roden Date: Tue, 5 Aug 2014 00:22:04 +0000 (+0200) Subject: Trim field name before using it. X-Git-Tag: 0.9-rc1^2~3^2~162 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=bb3b3ffa66245bd74fedaa0f7d596727eaabd93d;p=Sone.git Trim field name before using it. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index decd574..6703fc4 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -330,7 +330,7 @@ public class SoneDownloader extends AbstractService { return null; } try { - profile.addField(fieldName).setValue(fieldValue); + profile.addField(fieldName.trim()).setValue(fieldValue); } catch (IllegalArgumentException iae1) { logger.log(Level.WARNING, String.format("Duplicate field: %s", fieldName), iae1); return null;