public Set<Sone> getLikes(Reply reply) {
Set<Sone> sones = new HashSet<Sone>();
for (Sone sone : getSones()) {
- if (sone.getLikedPostIds().contains(reply.getId())) {
+ if (sone.getLikedReplyIds().contains(reply.getId())) {
sones.add(sone);
}
}
soneInserters.remove(sone).stop();
}
identityManager.removeContext((OwnIdentity) sone.getIdentity(), "Sone");
+ identityManager.removeProperty((OwnIdentity) sone.getIdentity(), "Sone.LatestEdition");
+ try {
+ configuration.getLongValue("Sone/" + sone.getId() + "/Time").setValue(null);
+ } catch (ConfigurationException ce1) {
+ logger.log(Level.WARNING, "Could not remove Sone from configuration!", ce1);
+ }
}
/**
/* load Sone. */
String sonePrefix = "Sone/" + sone.getId();
- long soneTime = configuration.getLongValue(sonePrefix + "/Time").getValue((long) 0);
+ Long soneTime = configuration.getLongValue(sonePrefix + "/Time").getValue(null);
+ if (soneTime == null) {
+ logger.log(Level.INFO, "Could not load Sone because no Sone has been saved.");
+ return;
+ }
long soneModificationCounter = configuration.getLongValue(sonePrefix + "/ModificationCounter").getValue((long) 0);
/* load profile. */