1
0
Fork 0

[org dedup] avoid NPEs in SparkPrepareOrgRels

This commit is contained in:
Claudio Atzori 2024-05-26 15:43:24 +02:00
parent 0d5bdb2db0
commit 1af4224d3d
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ public class SparkPrepareOrgRels extends AbstractSparkAction {
final Organization o = r._2()._2(); final Organization o = r._2()._2();
return new OrgSimRel( return new OrgSimRel(
r._1()._1(), r._1()._1(),
o.getOriginalId().get(0), Optional.ofNullable(o.getOriginalId()).map(oid -> oid.get(0)).orElse(null),
Optional.ofNullable(o.getLegalname()).map(Field::getValue).orElse(""), Optional.ofNullable(o.getLegalname()).map(Field::getValue).orElse(""),
Optional.ofNullable(o.getLegalshortname()).map(Field::getValue).orElse(""), Optional.ofNullable(o.getLegalshortname()).map(Field::getValue).orElse(""),
Optional.ofNullable(o.getCountry()).map(Qualifier::getClassid).orElse(""), Optional.ofNullable(o.getCountry()).map(Qualifier::getClassid).orElse(""),