From 7d3292551b976a5b07f7e283ec95d0bc4015e8e7 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 2 Jul 2024 15:43:11 +0200 Subject: [PATCH] ignore dates containing 'null's --- .../java/eu/dnetlib/dhp/schema/oaf/utils/MergeUtils.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/MergeUtils.java b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/MergeUtils.java index f1221add3..7606a4d2f 100644 --- a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/MergeUtils.java +++ b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/MergeUtils.java @@ -655,6 +655,13 @@ public class MergeUtils { return d1; } + if (StringUtils.contains(d1.getValue(), "null")) { + return d2; + } + if (StringUtils.contains(d2.getValue(), "null")) { + return d1; + } + return Stream .of(d1, d2) .min(