From: David ‘Bombe’ Roden Date: Thu, 17 Oct 2013 19:51:07 +0000 (+0200) Subject: Assign an empty name as default. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d8e1d149c0c2cfd2ec7eef75b2d13bccb1a9aaff;p=Sone.git Assign an empty name as default. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Profile.java b/src/main/java/net/pterodactylus/sone/data/Profile.java index fcea737..db55227 100644 --- a/src/main/java/net/pterodactylus/sone/data/Profile.java +++ b/src/main/java/net/pterodactylus/sone/data/Profile.java @@ -42,7 +42,7 @@ public class Profile implements Fingerprintable { /** The Sone this profile belongs to. */ private final Sone sone; - private volatile Name name; + private volatile Name name = new Name(); private volatile BirthDate birthDate = new BirthDate(); /** The ID of the avatar image. */ @@ -520,6 +520,10 @@ public class Profile implements Fingerprintable { private final Optional middle; private final Optional last; + public Name() { + this(Optional.absent(), Optional.absent(), Optional.absent()); + } + public Name(Optional first, Optional middle, Optional last) { this.first = first; this.middle = middle;