From dc07f1079b1b09aecb25a218a69cb594cb0462a6 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 8 Jun 2021 12:06:10 +0200 Subject: [PATCH] added check in case the author set to be enriched is null --- .../SparkOrcidToResultFromSemRelJob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/orcidtoresultfromsemrel/SparkOrcidToResultFromSemRelJob.java b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/orcidtoresultfromsemrel/SparkOrcidToResultFromSemRelJob.java index e90e43a20..436a53cbe 100644 --- a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/orcidtoresultfromsemrel/SparkOrcidToResultFromSemRelJob.java +++ b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/orcidtoresultfromsemrel/SparkOrcidToResultFromSemRelJob.java @@ -108,7 +108,7 @@ public class SparkOrcidToResultFromSemRelJob { return value -> { R ret = value._1(); Optional rol = Optional.ofNullable(value._2()); - if (rol.isPresent()) { + if (rol.isPresent() && Optional.ofNullable(ret.getAuthor()).isPresent()) { List toenrich_author = ret.getAuthor(); List autoritativeAuthors = rol.get().getAuthorList(); for (Author author : toenrich_author) {