NPE check

This commit is contained in:
Claudio Atzori 2020-05-15 16:04:46 +02:00
parent 7a89507ab1
commit 82b615ab33
1 changed files with 3 additions and 0 deletions

View File

@ -129,6 +129,9 @@ public class DedupUtility {
.max(Comparator.comparing(Tuple2::_1));
if (simAuhtor.isPresent() && simAuhtor.get()._1() > THRESHOLD) {
Author r = simAuhtor.get()._2();
if (r.getPid() == null) {
r.setPid(new ArrayList<>());
}
r.getPid().add(a._1());
}
});