Compare commits

...
3 Commits
Author SHA1 Message Date
Andrei Isvoran b562ffdf10 RED-9942 - Don't skip images on file 2024-08-23 13:03:25 +03:00
Dominique Eifländer 3eb97d614f Merge branch 'RED-9760-NPE' into 'main'
RED-9760: Fixed nullpointer in TextPageBlock

See merge request fforesight/layout-parser!194
2024-08-13 13:24:48 +02:00
Dominique Eifländer 81469413b0 RED-9760: Fixed nullpointer in TextPageBlock 2024-08-13 13:18:50 +02:00
2 changed files with 4 additions and 2 deletions
@@ -167,7 +167,7 @@ public class TOCEnrichmentService {
}
}
if (!startBlocks.isEmpty()) {
if (!startBlocks.isEmpty() || !startImages.isEmpty()) {
TableOfContentItem unassigned = new TableOfContentItem(null);
unassigned.setSectionBlocks(startBlocks);
unassigned.setImages(startImages);
@@ -49,7 +49,9 @@ public class TextPageBlock extends AbstractPageBlock {
public TextPageBlock(List<TextPositionSequence> sequences) {
this.sequences = sequences;
calculateFrequencyCounters();
if (!sequences.isEmpty()) {
calculateFrequencyCounters();
}
calculateBBox();
}