From 54e40cf0c1c650e9eca2d50762a92b5d13ccfa85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 24 Oct 2013 07:18:19 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20use=20the=20fingerprint=20of=20a?= =?utf8?q?=20field=20that=20has=20a=20null=20value.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/data/Profile.java | 4 +++- 1 file changed, 3 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 8c1e805..2b6991a 100644 --- a/src/main/java/net/pterodactylus/sone/data/Profile.java +++ b/src/main/java/net/pterodactylus/sone/data/Profile.java @@ -363,7 +363,9 @@ public class Profile implements Fingerprintable { } hash.putString("ContactInformation("); for (Field field : fields) { - hash.putString(field.getName()).putString("(").putString(field.getValue()).putString(")"); + if (field.getValue() != null) { + hash.putString(field.getName()).putString("(").putString(field.getValue()).putString(")"); + } } hash.putString(")"); hash.putString(")"); -- 2.7.4