mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue #41 : Handle null barcode metadata in PDF417 in corner case
This commit is contained in:
parent
8e2e0bc94d
commit
c42131e866
|
@ -183,14 +183,16 @@ public final class PDF417ScanningDecoder {
|
|||
|
||||
private static BarcodeMetadata getBarcodeMetadata(DetectionResultRowIndicatorColumn leftRowIndicatorColumn,
|
||||
DetectionResultRowIndicatorColumn rightRowIndicatorColumn) {
|
||||
if (leftRowIndicatorColumn == null || leftRowIndicatorColumn.getBarcodeMetadata() == null) {
|
||||
BarcodeMetadata leftBarcodeMetadata;
|
||||
if (leftRowIndicatorColumn == null ||
|
||||
(leftBarcodeMetadata = leftRowIndicatorColumn.getBarcodeMetadata()) == null) {
|
||||
return rightRowIndicatorColumn == null ? null : rightRowIndicatorColumn.getBarcodeMetadata();
|
||||
}
|
||||
if (rightRowIndicatorColumn == null || rightRowIndicatorColumn.getBarcodeMetadata() == null) {
|
||||
return leftRowIndicatorColumn.getBarcodeMetadata();
|
||||
BarcodeMetadata rightBarcodeMetadata;
|
||||
if (rightRowIndicatorColumn == null ||
|
||||
(rightBarcodeMetadata = rightRowIndicatorColumn.getBarcodeMetadata()) == null) {
|
||||
return leftBarcodeMetadata;
|
||||
}
|
||||
BarcodeMetadata leftBarcodeMetadata = leftRowIndicatorColumn.getBarcodeMetadata();
|
||||
BarcodeMetadata rightBarcodeMetadata = rightRowIndicatorColumn.getBarcodeMetadata();
|
||||
|
||||
if (leftBarcodeMetadata.getColumnCount() != rightBarcodeMetadata.getColumnCount() &&
|
||||
leftBarcodeMetadata.getErrorCorrectionLevel() != rightBarcodeMetadata.getErrorCorrectionLevel() &&
|
||||
|
|
Loading…
Reference in a new issue