X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=b70dbdbc0bc3e5586d65eafbe6c1e2c628bc1179;hb=50f89617d6c0b65e4ddce2daf65e5be7a075e5ea;hp=62741e785c5a569a6ec1809e06901c843946805a;hpb=13540271116aaa7b350d283ce8a8b97fce7e8123;p=Sone.git 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++; }