From: David ‘Bombe’ Roden Date: Mon, 8 Nov 2010 19:54:45 +0000 (+0100) Subject: Don’t NPE when the request URI is not yet set. X-Git-Tag: 0.2.1~19 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e2dfce49f775ca0084ed326ad56fe77321cb3d2d;p=Sone.git Don’t NPE when the request URI is not yet set. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 6467c20..2149a68 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -164,7 +164,7 @@ public class Sone { * @return The request URI of this Sone */ public FreenetURI getRequestUri() { - return requestUri.setSuggestedEdition(latestEdition); + return (requestUri != null) ? requestUri.setSuggestedEdition(latestEdition) : null; } /**