Fixed Index out of bounds exception in blockificationpostprocessingservice - this could should be documented btw, there are also probably other use-cases where the code doesnt work

This commit is contained in:
Timo Bejan 2024-07-30 17:45:05 +03:00
parent 7633566d9b
commit 0c1583c1be

View File

@ -273,6 +273,10 @@ public class BlockificationPostprocessingService {
List<TextPositionSequence> postSequence = new ArrayList<>();
StringBuilder currentSequence = new StringBuilder();
if (target.isBlank()){
return new WordSequenceResult();
}
for (TextPositionSequence sequence : textPositionSequences) {
currentSequence.append(sanitizeString(sequence.toString()));