RED-8481: Use visual layout parsing to detect signatures
fixed failing tests because of null pointer
This commit is contained in:
parent
fbd0196719
commit
cfc5db45cd
@ -33,13 +33,16 @@ public class VisualLayoutParsingAdapter {
|
||||
}
|
||||
|
||||
public Map<Integer, List<ClassifiedImage>> buildExtractedSignaturesPerPage(VisualLayoutParsingResponse visualLayoutParsingResponse) {
|
||||
if(visualLayoutParsingResponse != null) {
|
||||
|
||||
Map<Integer, List<ClassifiedImage>> tableCells = new HashMap<>();
|
||||
visualLayoutParsingResponse.getData()
|
||||
.forEach(tableData -> tableCells.computeIfAbsent(tableData.getPage_idx(), tableCell -> new ArrayList<>()).addAll(convertSignatures(tableData.getPage_idx(),tableData.getBoxes())));
|
||||
|
||||
return tableCells;
|
||||
Map<Integer, List<ClassifiedImage>> signatures = new HashMap<>();
|
||||
visualLayoutParsingResponse.getData()
|
||||
.forEach(tableData -> signatures.computeIfAbsent(tableData.getPage_idx(), tableCell -> new ArrayList<>())
|
||||
.addAll(convertSignatures(tableData.getPage_idx(), tableData.getBoxes())));
|
||||
|
||||
return signatures;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user