* if a parse error occurs, or the protocol is invalid
*/
public Sone parseSone(Sone originalSone, InputStream soneInputStream) throws SoneException {
- return new SoneParser(core).parseSone(core.getDatabase(), originalSone, soneInputStream);
+ return new SoneParser().parseSone(core.getDatabase(), originalSone, soneInputStream);
}
//
private static final Logger logger = Logger.getLogger(SoneParser.class.getName());
private static final int MAX_PROTOCOL_VERSION = 0;
- private final Core core;
-
- public SoneParser(Core core) {
- this.core = core;
- }
/**
* Parses a Sone from the given input stream and creates a new Sone from the
/* process avatar. */
if (avatarId != null) {
- profile.setAvatar(core.getImage(avatarId).orNull());
+ profile.setAvatar(database.getImage(avatarId).orNull());
}
/* okay, apparently everything was parsed correctly. Now import. */