Pull request #410: RED-4218: Do not perform surrounding text analysis for resize redactions with value = null

Merge in RED/redaction-service from RED-4218 to release/3.107.x

* commit '3c09f0a63f9e0010ce65d9d6281606c6118365d3':
  RED-4218: Do not perform surrounding text analysis for resize redactions with value = null
This commit is contained in:
Dominique Eiflaender 2022-06-13 12:32:05 +02:00
commit 637f7bc502

View File

@ -65,7 +65,7 @@ public class ManualRedactionSurroundingTextService {
var resizeItty = manualRedactions.getResizeRedactions().iterator();
while (resizeItty.hasNext()) {
var manualResizeRedaction = resizeItty.next();
if (sectionContainsEntry(sectionArea, manualResizeRedaction.getPositions())) {
if (manualResizeRedaction.getValue() != null && sectionContainsEntry(sectionArea, manualResizeRedaction.getPositions())) {
var surroundingText = findSurroundingText(sectionText, manualResizeRedaction.getValue(), manualResizeRedaction.getPositions());
manualResizeRedaction.setTextBefore(surroundingText.getLeft());
manualResizeRedaction.setTextAfter(surroundingText.getRight());