From 99ac5bab463af7a04328ba28c9d4d403fe686efd Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 4 May 2023 19:38:39 +0200 Subject: [PATCH] added check to avoid NPE when checking the organization country --- .../eu/dnetlib/dhp/oa/graph/clean/GetDatasourceFromCountry.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/GetDatasourceFromCountry.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/GetDatasourceFromCountry.java index a69b1a8bf..85e446121 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/GetDatasourceFromCountry.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/GetDatasourceFromCountry.java @@ -78,6 +78,8 @@ public class GetDatasourceFromCountry implements Serializable { Encoders.bean(Organization.class)) .filter( (FilterFunction) o -> !o.getDataInfo().getDeletedbyinference() && + o.getCountry() != null && + o.getCountry().getClassid() != null && o.getCountry().getClassid().length() > 0 && o.getCountry().getClassid().equals(country));