From 3becaa5539aee14592873f90ebfd7275206f4f61 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 29 Mar 2021 16:01:35 +0200 Subject: [PATCH] [Cleaning] drop alternate identifiers with empty values --- .../main/java/eu/dnetlib/dhp/schema/oaf/CleaningFunctions.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/CleaningFunctions.java b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/CleaningFunctions.java index 3be062c0c..401d5d444 100644 --- a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/CleaningFunctions.java +++ b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/CleaningFunctions.java @@ -155,12 +155,14 @@ public class CleaningFunctions { final Set pids = pid .stream() + .filter(Objects::nonNull) .filter(p -> StringUtils.isNotBlank(p.getValue())) .collect(Collectors.toCollection(HashSet::new)); Optional.ofNullable(i.getAlternateIdentifier()) .ifPresent(altId -> { final Set altIds = altId.stream() + .filter(Objects::nonNull) .filter(p -> StringUtils.isNotBlank(p.getValue())) .collect(Collectors.toCollection(HashSet::new));