From: David ‘Bombe’ Roden Date: Tue, 30 Nov 2010 16:35:21 +0000 (+0100) Subject: Explicitely store a null if there is no recipient. X-Git-Tag: 0.3.2-RC2~1 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f7a67e62c110d3bf07a485a1d06f12d48b30e4d3;p=Sone.git Explicitely store a null if there is no recipient. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 24f1209..52ebfab 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1143,9 +1143,7 @@ public class Core implements IdentityListener { for (Post post : sone.getPosts()) { String postPrefix = sonePrefix + "/Posts/" + postCounter++; configuration.getStringValue(postPrefix + "/ID").setValue(post.getId()); - if (post.getRecipient() != null) { - configuration.getStringValue(postPrefix + "/Recipient").setValue(post.getRecipient().getId()); - } + configuration.getStringValue(postPrefix + "/Recipient").setValue((post.getRecipient() != null) ? post.getRecipient().getId() : null); configuration.getLongValue(postPrefix + "/Time").setValue(post.getTime()); configuration.getStringValue(postPrefix + "/Text").setValue(post.getText()); }