[Cleaning] trying to avoid NPEs, this time by ruling out authors without a defined fullname

This commit is contained in:
Claudio Atzori 2021-01-25 18:11:49 +01:00
parent 3465c8ccee
commit cd379eb5e3
1 changed files with 9 additions and 0 deletions

View File

@ -190,6 +190,15 @@ public class CleaningFunctions {
}
}
if (Objects.nonNull(r.getAuthor())) {
r
.setAuthor(
r
.getAuthor()
.stream()
.filter(a -> Objects.nonNull(a))
.filter(a -> StringUtils.isNotBlank(StringUtils.trim(a.getFullname())))
.collect(Collectors.toList()));
boolean nullRank = r
.getAuthor()
.stream()