RED-7891: Fixed indexOutOfBounds if imported redactions are available in reanalysis
This commit is contained in:
parent
ad9bf6f846
commit
4e88bec0e4
@ -123,8 +123,8 @@ public class EntityLogCreatorService {
|
|||||||
Set<String> newEntityIds = newEntityLogEntries.stream().map(EntityLogEntry::getId).collect(Collectors.toSet());
|
Set<String> newEntityIds = newEntityLogEntries.stream().map(EntityLogEntry::getId).collect(Collectors.toSet());
|
||||||
List<EntityLogEntry> previousEntriesFromReAnalyzedSections = previousEntityLog.getEntityLogEntry()
|
List<EntityLogEntry> previousEntriesFromReAnalyzedSections = previousEntityLog.getEntityLogEntry()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(entry -> (newEntityIds.contains(entry.getId()) || sectionsToReanalyseIds.contains(entry.getContainingNodeId().get(0))) && !entry.getType()
|
.filter(entry -> !entry.getType()
|
||||||
.equals(ImportedRedactionService.IMPORTED_REDACTION_TYPE))
|
.equals(ImportedRedactionService.IMPORTED_REDACTION_TYPE) && (newEntityIds.contains(entry.getId()) || sectionsToReanalyseIds.contains(entry.getContainingNodeId().get(0))))
|
||||||
.toList();
|
.toList();
|
||||||
previousEntityLog.getEntityLogEntry().removeAll(previousEntriesFromReAnalyzedSections);
|
previousEntityLog.getEntityLogEntry().removeAll(previousEntriesFromReAnalyzedSections);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user