From 3806b7fc8134edb5a2660b25defa03553eac371b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 16 Oct 2010 11:32:32 +0200 Subject: [PATCH] Only add parsed Sone if it is not null. --- src/main/java/net/pterodactylus/sone/core/Core.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.7.4