From: David ‘Bombe’ Roden Date: Thu, 24 Oct 2013 05:18:19 +0000 (+0200) Subject: Don’t use the fingerprint of a field that has a null value. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=54e40cf0c1c650e9eca2d50762a92b5d13ccfa85;p=Sone.git Don’t use the fingerprint of a field that has a null value. --- 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(")");