From: David ‘Bombe’ Roden Date: Thu, 14 Oct 2010 06:25:17 +0000 (+0200) Subject: Store a copy of the given profile. X-Git-Tag: 0.1-RC1~436 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=50f89617d6c0b65e4ddce2daf65e5be7a075e5ea;p=Sone.git Store a copy of the given profile. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 62741e7..b70dbdb 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -141,13 +141,15 @@ public class Sone { } /** - * Sets the profile of this Sone. + * Sets the profile of this Sone. A copy of the given profile is stored so + * that subsequent modifications of the given profile are not reflected in + * this Sone! * * @param profile * The profile to set */ public synchronized void setProfile(Profile profile) { - this.profile = profile; + this.profile = new Profile(profile); modificationCounter++; }