From: David ‘Bombe’ Roden Date: Sat, 16 Oct 2010 09:32:32 +0000 (+0200) Subject: Only add parsed Sone if it is not null. X-Git-Tag: 0.1-RC1~282 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3806b7fc8134edb5a2660b25defa03553eac371b;p=Sone.git Only add parsed Sone if it is not null. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index b2aa43d..94d1169 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -313,7 +313,9 @@ public class Core extends AbstractService { FreenetURI realRequestUri = new FreenetURI(requestUri).setMetaString(new String[] { "sone.xml" }); FetchResult fetchResult = freenetInterface.fetchUri(realRequestUri); Sone parsedSone = soneDownloader.parseSone(null, fetchResult, realRequestUri); - addSone(parsedSone); + if (parsedSone != null) { + addSone(parsedSone); + } } catch (MalformedURLException mue1) { logger.log(Level.INFO, "Could not create URI from “" + requestUri + "”.", mue1); }