Fix index out of bounds exception

This commit is contained in:
Thierry Göckel 2020-08-13 11:13:01 +02:00
parent 32aa500983
commit 17aabcd09c
2 changed files with 4 additions and 1 deletions

View File

@ -81,6 +81,9 @@ public class Table extends AbstractTextContainer {
private List<String> computeHeaders() {
boolean allBold = true;
if (rows.isEmpty()) {
return Collections.emptyList();
}
List<Cell> rowCells = rows.get(0);
for (Cell cell : rowCells) {
if (cell == null || CollectionUtils.isEmpty(cell.getTextBlocks()) ||

View File

@ -262,7 +262,7 @@ public class RedactionIntegrationTest {
public void redactionTest() throws IOException {
long start = System.currentTimeMillis();
ClassPathResource pdfFileResource = new ClassPathResource("files/Metolachlor/S-Metolachlor_RAR_21_Volume_3CP_A9396G_B-9_2018-09-06.pdf");
ClassPathResource pdfFileResource = new ClassPathResource("files/Trinexapac/96 Trinexapac-ethyl_RAR_09_Volume_3CA_B-7_2018-02-23.pdf");
RedactionRequest request = RedactionRequest.builder()
.document(IOUtils.toByteArray(pdfFileResource.getInputStream()))