Don’t use the fingerprint of a field that has a null value.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 24 Oct 2013 05:18:19 +0000 (07:18 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:35 +0000 (22:25 +0100)
src/main/java/net/pterodactylus/sone/data/Profile.java

index 8c1e805..2b6991a 100644 (file)
@@ -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(")");