Trim field name before using it.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 5 Aug 2014 00:22:04 +0000 (02:22 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 5 Aug 2014 00:22:04 +0000 (02:22 +0200)
src/main/java/net/pterodactylus/sone/core/SoneDownloader.java

index decd574..6703fc4 100644 (file)
@@ -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;