Fixed service not found in cache.
This commit is contained in:
parent
481dfce2d5
commit
5ca7f96371
1 changed files with 19 additions and 8 deletions
|
@ -259,9 +259,12 @@ public class Factory
|
|||
{
|
||||
URL serviceInputURL = new URL(property.getValue());
|
||||
Service service = loadService(serviceInputURL, cache);
|
||||
service.setOrganization(result);
|
||||
service.setLogoFileName(result.getTechnicalName() + "-" + service.getLogoFileName());
|
||||
result.getServices().add(service);
|
||||
if (service != null)
|
||||
{
|
||||
service.setOrganization(result);
|
||||
service.setLogoFileName(result.getTechnicalName() + "-" + service.getLogoFileName());
|
||||
result.getServices().add(service);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -282,11 +285,19 @@ public class Factory
|
|||
|
||||
File inputFile = cache.restoreFile(inputURL);
|
||||
|
||||
PathProperties properties = PathPropertyUtils.load(inputFile);
|
||||
result = new Service(properties);
|
||||
result.setInputFile(inputFile);
|
||||
result.setInputURL(inputURL);
|
||||
result.setLogoFileName(result.getTechnicalName() + "-logo" + StringUtils.defaultIfBlank(cache.getExtension(result.getLogoURL()), ".png"));
|
||||
if (inputFile == null)
|
||||
{
|
||||
logger.warn("WARNING: service not found in cache [{}]", inputURL);
|
||||
result = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
PathProperties properties = PathPropertyUtils.load(inputFile);
|
||||
result = new Service(properties);
|
||||
result.setInputFile(inputFile);
|
||||
result.setInputURL(inputURL);
|
||||
result.setLogoFileName(result.getTechnicalName() + "-logo" + StringUtils.defaultIfBlank(cache.getExtension(result.getLogoURL()), ".png"));
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue