Merge branch 'RED-10644-4.2' into 'release/4.348.x'
RED-10644: Fixed dublicated entries with whitespace at the end See merge request redactmanager/redaction-service!574
This commit is contained in:
commit
29cab89def
@ -1000,11 +1000,11 @@ public class EntityCreationService {
|
|||||||
return Optional.empty(); // Entity has been recategorized and should not be created at all.
|
return Optional.empty(); // Entity has been recategorized and should not be created at all.
|
||||||
}
|
}
|
||||||
TextEntity existingEntity = optionalTextEntity.get();
|
TextEntity existingEntity = optionalTextEntity.get();
|
||||||
if (existingEntity.getTextRange().equals(textRange)) {
|
if (existingEntity.getTextRange().equals(trimmedTextRange)) {
|
||||||
return optionalTextEntity; // exactly the same entity, return directly
|
return optionalTextEntity; // exactly the same entity, return directly
|
||||||
}
|
}
|
||||||
if (!existingEntity.resized()) {
|
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 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
|
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