From 26d5d5cd2232b44792674c1a91c5db88bcb30765 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Tue, 22 Jun 2021 15:19:34 +0200 Subject: [PATCH] Fixed null case in ServiceUptimes.of method. --- .../devinsy/statoolinfos/uptime/ServiceUptimes.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/uptime/ServiceUptimes.java b/src/fr/devinsy/statoolinfos/uptime/ServiceUptimes.java index 3ebe860..69dc596 100644 --- a/src/fr/devinsy/statoolinfos/uptime/ServiceUptimes.java +++ b/src/fr/devinsy/statoolinfos/uptime/ServiceUptimes.java @@ -46,10 +46,8 @@ public class ServiceUptimes extends ArrayList /** * Adds the. * - * @param serviceName - * the service name - * @param organizationName - * the organization name + * @param service + * the service * @param uptime * the uptime */ @@ -117,9 +115,12 @@ public class ServiceUptimes extends ArrayList for (Service service : services) { - for (Uptime uptime : journal.getUptimes(service.getWebsiteURL())) + if (service.getWebsiteURL() != null) { - result.add(service, uptime); + for (Uptime uptime : journal.getUptimes(service.getWebsiteURL())) + { + result.add(service, uptime); + } } }