Don’t use the fingerprint of a field that has a null value.
[Sone.git] / 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(")");