Don’t NPE when the request URI is not yet set.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Nov 2010 19:54:45 +0000 (20:54 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 10 Nov 2010 19:50:11 +0000 (20:50 +0100)
src/main/java/net/pterodactylus/sone/data/Sone.java

index 6467c20..2149a68 100644 (file)
@@ -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;
        }
 
        /**