From: David ‘Bombe’ Roden Date: Sat, 2 Feb 2013 21:47:22 +0000 (+0100) Subject: Copy options when rescuing Sone. X-Git-Tag: 0.8.5^2~3^2~24 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=69870060d45d5cdca064e67779dfc5619001ae42;p=Sone.git Copy options when rescuing Sone. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 9fe41ac..0571e0d 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1091,6 +1091,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, } } synchronized (sones) { + sone.setOptions(storedSone.get().getOptions()); sones.put(sone.getId(), sone); } } diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 9d9d2d7..a609982 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -228,7 +228,7 @@ public class Sone implements Fingerprintable, Comparable { private final List albums = new CopyOnWriteArrayList(); /** Sone-specific options. */ - private final Options options = new Options(); + private Options options = new Options(); /** * Creates a new Sone. @@ -895,6 +895,17 @@ public class Sone implements Fingerprintable, Comparable { return options; } + /** + * Sets the options of this Sone. + * + * @param options + * The options of this Sone + */ + /* TODO - remove this method again, maybe add an option provider */ + public void setOptions(Options options) { + this.options = options; + } + // // FINGERPRINTABLE METHODS //