forked from D-Net/dnet-hadoop
added check in case the author set to be enriched is null
This commit is contained in:
parent
8d2e086e48
commit
dc07f1079b
|
@ -108,7 +108,7 @@ public class SparkOrcidToResultFromSemRelJob {
|
||||||
return value -> {
|
return value -> {
|
||||||
R ret = value._1();
|
R ret = value._1();
|
||||||
Optional<ResultOrcidList> rol = Optional.ofNullable(value._2());
|
Optional<ResultOrcidList> rol = Optional.ofNullable(value._2());
|
||||||
if (rol.isPresent()) {
|
if (rol.isPresent() && Optional.ofNullable(ret.getAuthor()).isPresent()) {
|
||||||
List<Author> toenrich_author = ret.getAuthor();
|
List<Author> toenrich_author = ret.getAuthor();
|
||||||
List<AutoritativeAuthor> autoritativeAuthors = rol.get().getAuthorList();
|
List<AutoritativeAuthor> autoritativeAuthors = rol.get().getAuthorList();
|
||||||
for (Author author : toenrich_author) {
|
for (Author author : toenrich_author) {
|
||||||
|
|
Loading…
Reference in New Issue