Integer profileBirthYear = Numbers.safeParseInteger(profileXml.getValue("birth-year", null));
Profile profile = new Profile().setFirstName(profileFirstName).setMiddleName(profileMiddleName).setLastName(profileLastName);
profile.setBirthDay(profileBirthDay).setBirthMonth(profileBirthMonth).setBirthYear(profileBirthYear);
+ /* avatar is processed after images are loaded. */
+ String avatarId = profileXml.getValue("avatar", null);
/* parse profile fields. */
SimpleXML profileFieldsXml = profileXml.getNode("fields");
}
}
+ /* process avatar. */
+ if (avatarId != null) {
+ sone.setAvatar(core.getImage(avatarId, false));
+ }
+
/* okay, apparently everything was parsed correctly. Now import. */
/* atomic setter operation on the Sone. */
synchronized (sone) {