Make profile fields immutable.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 8edb14f..8fcfe10 100644 (file)
@@ -965,7 +965,7 @@ public class Core extends AbstractService implements SoneProvider {
                                break;
                        }
                        String fieldValue = configuration.getStringValue(fieldPrefix + "/Value").getValue("");
-                       profile.addField(fieldName).setValue(fieldValue);
+                       profile.setField(profile.addField(fieldName), fieldValue);
                }
 
                /* load posts. */