forked from D-Net/dnet-hadoop
[Cleaning] trying to avoid NPEs
This commit is contained in:
parent
646dab7f68
commit
07a0ccfc96
|
@ -59,11 +59,15 @@ public class CleaningFunctions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(r.getAuthor())) {
|
if (Objects.nonNull(r.getAuthor())) {
|
||||||
r.getAuthor().forEach(a -> {
|
r.getAuthor()
|
||||||
|
.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.forEach(a -> {
|
||||||
if (Objects.nonNull(a.getPid())) {
|
if (Objects.nonNull(a.getPid())) {
|
||||||
a.getPid().forEach(p -> {
|
a.getPid()
|
||||||
fixVocabName(p.getQualifier(), ModelConstants.DNET_PID_TYPES);
|
.stream()
|
||||||
});
|
.filter(Objects::nonNull)
|
||||||
|
.forEach(p -> fixVocabName(p.getQualifier(), ModelConstants.DNET_PID_TYPES));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue