🔥 Remove fetching of custom edition from rescuer
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneRescuer.java
index f45e351..93c77c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - SoneRescuer.java - Copyright Â© 2011–2013 David Roden
+ * Sone - SoneRescuer.java - Copyright Â© 2011–2019 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,8 +24,6 @@ import freenet.keys.FreenetURI;
 /**
  * The Sone rescuer downloads older editions of a Sone and updates the currently
  * stored Sone with it.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David â€˜Bombe’ Roden</a>
  */
 public class SoneRescuer extends AbstractService {
 
@@ -116,9 +114,8 @@ public class SoneRescuer extends AbstractService {
         *            The edition to rescue
         * @return This Sone rescuer
         */
-       public SoneRescuer setEdition(long edition) {
+       public void setEdition(long edition) {
                currentEdition = edition;
-               return this;
        }
 
        /**
@@ -161,7 +158,7 @@ public class SoneRescuer extends AbstractService {
                        }
                        if (fetching) {
                                core.lockSone(sone);
-                               FreenetURI soneUri = sone.getRequestUri().setKeyType("SSK").setDocName("Sone-" + currentEdition).setMetaString(new String[] { "sone.xml" });
+                               FreenetURI soneUri = sone.getRequestUri().setKeyType("SSK").setDocName("Sone-" + getNextEdition()).setMetaString(new String[] { "sone.xml" });
                                System.out.println("URI: " + soneUri);
                                Sone fetchedSone = soneDownloader.fetchSone(sone, soneUri, true);
                                System.out.println("Sone: " + fetchedSone);