From d8e1d149c0c2cfd2ec7eef75b2d13bccb1a9aaff Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 17 Oct 2013 21:51:07 +0200 Subject: [PATCH] Assign an empty name as default. --- src/main/java/net/pterodactylus/sone/data/Profile.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.7.4