Use a modifier to set the latest edition of a Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / FreenetInterface.java
index bea268b..3baaa7d 100644 (file)
@@ -225,7 +225,7 @@ public class FreenetInterface {
                                public void onFoundEdition(long edition, USK key, ObjectContainer objectContainer, ClientContext clientContext, boolean metadata, short codec, byte[] data, boolean newKnownGood, boolean newSlotToo) {
                                        logger.log(Level.FINE, String.format("Found USK update for Sone ā€œ%sā€ at %s, new known good: %s, new slot too: %s.", sone, key, newKnownGood, newSlotToo));
                                        if (edition > sone.getLatestEdition()) {
-                                               sone.setLatestEdition(edition);
+                                               sone.modify().setLatestEdition(edition).update();
                                                new Thread(new Runnable() {
 
                                                        @Override