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) {
|
public Map<Integer, List<ClassifiedImage>> buildExtractedSignaturesPerPage(VisualLayoutParsingResponse visualLayoutParsingResponse) {
|
||||||
|
if(visualLayoutParsingResponse != null) {
|
||||||
|
|
||||||
Map<Integer, List<ClassifiedImage>> tableCells = new HashMap<>();
|
Map<Integer, List<ClassifiedImage>> signatures = new HashMap<>();
|
||||||
visualLayoutParsingResponse.getData()
|
visualLayoutParsingResponse.getData()
|
||||||
.forEach(tableData -> tableCells.computeIfAbsent(tableData.getPage_idx(), tableCell -> new ArrayList<>()).addAll(convertSignatures(tableData.getPage_idx(),tableData.getBoxes())));
|
.forEach(tableData -> signatures.computeIfAbsent(tableData.getPage_idx(), tableCell -> new ArrayList<>())
|
||||||
|
.addAll(convertSignatures(tableData.getPage_idx(), tableData.getBoxes())));
|
||||||
return tableCells;
|
|
||||||
|
|
||||||
|
return signatures;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user