From: David ‘Bombe’ Roden Date: Tue, 24 Nov 2015 20:18:27 +0000 (+0100) Subject: Prevent NPE if last good version is null X-Git-Tag: v0.1.4^2~14 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=044ddfcf212ee69091e0b854ec02769fc125477b;p=jFCPlib.git Prevent NPE if last good version is null --- diff --git a/src/main/java/net/pterodactylus/fcp/AddPeer.java b/src/main/java/net/pterodactylus/fcp/AddPeer.java index e9ad80d..f098106 100644 --- a/src/main/java/net/pterodactylus/fcp/AddPeer.java +++ b/src/main/java/net/pterodactylus/fcp/AddPeer.java @@ -80,7 +80,7 @@ public class AddPeer extends FcpMessage { * The noderef of the peer */ private void setNodeRef(NodeRef nodeRef) { - setField("lastGoodVersion", nodeRef.getLastGoodVersion().toString()); + setField("lastGoodVersion", String.valueOf(nodeRef.getLastGoodVersion())); setField("opennet", String.valueOf(nodeRef.isOpennet())); setField("identity", nodeRef.getIdentity()); setField("myName", nodeRef.getMyName());