added check if author.pid exists or is null
This commit is contained in:
parent
13f30664ea
commit
b7dd400e51
|
@ -187,7 +187,11 @@ public class SparkOrcidToResultFromSemRelJob3 {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean containsAllowedPid(Author a) {
|
private static boolean containsAllowedPid(Author a) {
|
||||||
for (StructuredProperty pid : a.getPid()) {
|
Optional<List<StructuredProperty>> pids = Optional.ofNullable(a.getPid());
|
||||||
|
if (!pids.isPresent()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (StructuredProperty pid : pids.get()) {
|
||||||
if (PROPAGATION_AUTHOR_PID.equals(pid.getQualifier().getClassid())) {
|
if (PROPAGATION_AUTHOR_PID.equals(pid.getQualifier().getClassid())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue