Store birth date in its own class, only update it via a modifier.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneParser.java
index 2e8299f..87d659f 100644 (file)
@@ -177,7 +177,7 @@ public class SoneParser {
                Integer profileBirthMonth = Numbers.safeParseInteger(profileXml.getValue("birth-month", null));
                Integer profileBirthYear = Numbers.safeParseInteger(profileXml.getValue("birth-year", null));
                Profile profile = new Profile(sone).modify().setFirstName(profileFirstName).setMiddleName(profileMiddleName).setLastName(profileLastName).update();
-               profile.setBirthDay(profileBirthDay).setBirthMonth(profileBirthMonth).setBirthYear(profileBirthYear);
+               profile.modify().setBirthDay(profileBirthDay).setBirthMonth(profileBirthMonth).setBirthYear(profileBirthYear).update();
                /* avatar is processed after images are loaded. */
                String avatarId = profileXml.getValue("avatar", null);