fixed NPE

This commit is contained in:
Timo Bejan 2021-10-07 10:51:21 +03:00
parent 38ed95ea94
commit 082027f7b6

View File

@ -72,12 +72,12 @@ public class AnalysisFlagsCalculationService {
}
var lastChange = entry.getChanges().isEmpty() ? null : entry.getChanges().get(entry.getChanges().size() - 1);
if (lastChange != null && lastChange.getDateTime() != null &&
!entry.getPositions().isEmpty() && viewedPages.get(entry.getPositions().get(0).getPage()).isBefore(lastChange.getDateTime())) {
var viewedPage = entry.getPositions().isEmpty() ? null : viewedPages.get(entry.getPositions().get(0).getPage());
if (lastChange != null && lastChange.getDateTime() != null && viewedPage != null && viewedPage.isBefore(lastChange.getDateTime())) {
hasUpdates = true;
}
if (hasRedactions && hasHints && hasSuggestions && hasImages && hasComments && hasUpdates) {
break;
}