Fixed null case in ServiceUptimes.of method.

This commit is contained in:
Christian P. MOMON 2021-06-22 15:19:34 +02:00
parent f3b9de1fd7
commit 26d5d5cd22

View file

@ -46,10 +46,8 @@ public class ServiceUptimes extends ArrayList<ServiceUptime>
/**
* Adds the.
*
* @param serviceName
* the service name
* @param organizationName
* the organization name
* @param service
* the service
* @param uptime
* the uptime
*/
@ -116,12 +114,15 @@ public class ServiceUptimes extends ArrayList<ServiceUptime>
result = new ServiceUptimes();
for (Service service : services)
{
if (service.getWebsiteURL() != null)
{
for (Uptime uptime : journal.getUptimes(service.getWebsiteURL()))
{
result.add(service, uptime);
}
}
}
//
return result;