[cleaning] avoid NPE

This commit is contained in:
Claudio Atzori 2022-12-09 15:44:57 +01:00
parent 389dd25430
commit 8b44afe5e5
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,8 @@ public class CleanCfHbSparkJob {
r.getInstance().stream().map(Instance::getHostedby).map(KeyValue::getKey), r.getInstance().stream().map(Instance::getHostedby).map(KeyValue::getKey),
r.getInstance().stream().map(Instance::getCollectedfrom).map(KeyValue::getKey))) r.getInstance().stream().map(Instance::getCollectedfrom).map(KeyValue::getKey)))
.distinct() .distinct()
.map(s -> asIdCfHbMapping(r.getId(), s)) .filter(StringUtils::isNotBlank)
.map(cfHb -> asIdCfHbMapping(r.getId(), cfHb))
.iterator(); .iterator();
} }