RED-8481: Use visual layout parsing to detect signatures
fixed failing tests because of null pointer
This commit is contained in:
parent
cfc5db45cd
commit
c3e7582ee3
@ -215,7 +215,10 @@ public class LayoutParsingPipeline {
|
||||
addNumberOfPagesToTrace(originDocument.getNumberOfPages(), Files.size(originFile.toPath()));
|
||||
Map<Integer, List<TableCells>> pdfTableCells = cvTableParsingAdapter.buildCvParsedTablesPerPage(tableServiceResponse);
|
||||
Map<Integer, List<ClassifiedImage>> pdfImages = imageServiceResponseAdapter.buildClassifiedImagesPerPage(imageServiceResponse);
|
||||
Map<Integer, List<ClassifiedImage>> signatures = visualLayoutParsingAdapter.buildExtractedSignaturesPerPage(visualLayoutParsingResponse);
|
||||
Map<Integer, List<ClassifiedImage>> signatures = null;
|
||||
if(visualLayoutParsingResponse != null) {
|
||||
signatures = visualLayoutParsingAdapter.buildExtractedSignaturesPerPage(visualLayoutParsingResponse);
|
||||
}
|
||||
|
||||
ClassificationDocument classificationDocument = new ClassificationDocument();
|
||||
List<ClassificationPage> classificationPages = new ArrayList<>();
|
||||
|
||||
@ -33,7 +33,6 @@ public class VisualLayoutParsingAdapter {
|
||||
}
|
||||
|
||||
public Map<Integer, List<ClassifiedImage>> buildExtractedSignaturesPerPage(VisualLayoutParsingResponse visualLayoutParsingResponse) {
|
||||
if(visualLayoutParsingResponse != null) {
|
||||
|
||||
Map<Integer, List<ClassifiedImage>> signatures = new HashMap<>();
|
||||
visualLayoutParsingResponse.getData()
|
||||
@ -42,8 +41,6 @@ public class VisualLayoutParsingAdapter {
|
||||
|
||||
return signatures;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public List<VisualLayoutParsingResult> convertTableCells(List<VisualLayoutParsingBox> tableObjects) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user