From b62fb38344eeb45c992c63de95c77fd6cad752f2 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 16 Jun 2010 18:43:45 +0000 Subject: [PATCH] fix for case where no release provider responds during auto-update (caused NPE) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6924 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/yacy/yacyRelease.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/de/anomic/yacy/yacyRelease.java b/source/de/anomic/yacy/yacyRelease.java index cb5f923f2..eeb723d3e 100644 --- a/source/de/anomic/yacy/yacyRelease.java +++ b/source/de/anomic/yacy/yacyRelease.java @@ -195,8 +195,8 @@ public final class yacyRelease extends yacyVersion { for (yacyUpdateLocation updateLocation : latestReleaseLocations) { if(!onlySigned || updateLocation.getPublicKey() != null) { DevAndMainVersions versions = getReleases(updateLocation, force); - if ((versions != null) && (versions.dev != null)) alldev.addAll(versions.dev); - if ((versions != null) && (versions.main != null)) allmain.addAll(versions.main); + if (versions != null && versions.dev != null) alldev.addAll(versions.dev); + if (versions != null && versions.main != null) allmain.addAll(versions.main); } } return new DevAndMainVersions(alldev, allmain); @@ -218,7 +218,7 @@ public final class yacyRelease extends yacyVersion { (latestRelease[2].isEmpty()) && (latestRelease[3].isEmpty()) )*/) { locLatestRelease = allReleaseFrom(location); - latestReleases.put(location, locLatestRelease); + if (locLatestRelease != null) latestReleases.put(location, locLatestRelease); } return locLatestRelease; }