From: David ‘Bombe’ Roden Date: Thu, 4 Nov 2010 21:44:23 +0000 (+0100) Subject: Return null when the insert URI is null, don’t NPE. X-Git-Tag: 0.2-RC1~38 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f740e30811efaa1f1a0e110218984e242755f897;p=Sone.git Return null when the insert URI is null, don’t NPE. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 0afbf3b..430973c 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -193,7 +193,7 @@ public class Sone { * @return The insert URI of this Sone */ public FreenetURI getInsertUri() { - return insertUri.setSuggestedEdition(latestEdition); + return (insertUri != null) ? insertUri.setSuggestedEdition(latestEdition) : null; } /**