Merge branch 'RED-10644-4.3' into 'release/4.423.x'
RED-10644: Fixed dublicated entries with whitespace at the end See merge request redactmanager/redaction-service!575
This commit is contained in:
commit
751eb63394
@ -1002,11 +1002,11 @@ public class EntityCreationService {
|
||||
return Optional.empty(); // Entity has been recategorized and should not be created at all.
|
||||
}
|
||||
TextEntity existingEntity = optionalTextEntity.get();
|
||||
if (existingEntity.getTextRange().equals(textRange)) {
|
||||
if (existingEntity.getTextRange().equals(trimmedTextRange)) {
|
||||
return optionalTextEntity; // exactly the same entity, return directly
|
||||
}
|
||||
if (!existingEntity.resized()) {
|
||||
addDuplicateEntityToGraph(existingEntity, textRange, node);
|
||||
addDuplicateEntityToGraph(existingEntity, trimmedTextRange, node);
|
||||
return optionalTextEntity; // If Entity has not been resized, insert as duplicate at appropriate position
|
||||
}
|
||||
return Optional.empty(); // Entity has been resized, if there are duplicates they should be treated there
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user