forked from D-Net/dnet-hadoop
[cleaning] avoiding NPEs handling null author PIDs
This commit is contained in:
parent
11b22b2d23
commit
902d05f548
|
@ -58,9 +58,9 @@ public class CleaningFunctions {
|
|||
}
|
||||
}
|
||||
if (Objects.nonNull(r.getAuthor())) {
|
||||
r.getAuthor().forEach(a -> {
|
||||
r.getAuthor().stream().filter(Objects::nonNull).forEach(a -> {
|
||||
if (Objects.nonNull(a.getPid())) {
|
||||
a.getPid().forEach(p -> {
|
||||
a.getPid().stream().filter(Objects::nonNull).forEach(p -> {
|
||||
fixVocabName(p.getQualifier(), ModelConstants.DNET_PID_TYPES);
|
||||
});
|
||||
}
|
||||
|
@ -218,6 +218,7 @@ public class CleaningFunctions {
|
|||
a
|
||||
.getPid()
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(p -> Objects.nonNull(p.getQualifier()))
|
||||
.filter(p -> StringUtils.isNotBlank(p.getValue()))
|
||||
.map(p -> {
|
||||
|
|
Loading…
Reference in New Issue