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
pull/1/head
orbiter 15 years ago
parent de4f30bb2e
commit b62fb38344

@ -195,8 +195,8 @@ public final class yacyRelease extends yacyVersion {
for (yacyUpdateLocation updateLocation : latestReleaseLocations) { for (yacyUpdateLocation updateLocation : latestReleaseLocations) {
if(!onlySigned || updateLocation.getPublicKey() != null) { if(!onlySigned || updateLocation.getPublicKey() != null) {
DevAndMainVersions versions = getReleases(updateLocation, force); DevAndMainVersions versions = getReleases(updateLocation, force);
if ((versions != null) && (versions.dev != null)) alldev.addAll(versions.dev); if (versions != null && versions.dev != null) alldev.addAll(versions.dev);
if ((versions != null) && (versions.main != null)) allmain.addAll(versions.main); if (versions != null && versions.main != null) allmain.addAll(versions.main);
} }
} }
return new DevAndMainVersions(alldev, allmain); return new DevAndMainVersions(alldev, allmain);
@ -218,7 +218,7 @@ public final class yacyRelease extends yacyVersion {
(latestRelease[2].isEmpty()) && (latestRelease[2].isEmpty()) &&
(latestRelease[3].isEmpty()) )*/) { (latestRelease[3].isEmpty()) )*/) {
locLatestRelease = allReleaseFrom(location); locLatestRelease = allReleaseFrom(location);
latestReleases.put(location, locLatestRelease); if (locLatestRelease != null) latestReleases.put(location, locLatestRelease);
} }
return locLatestRelease; return locLatestRelease;
} }

Loading…
Cancel
Save