mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
More FindBugs changes as part of test
This commit is contained in:
parent
9567698f63
commit
7169d1ad18
|
@ -25,7 +25,7 @@ import com.google.zxing.Dimension;
|
|||
*/
|
||||
public class SymbolInfo {
|
||||
|
||||
public static final SymbolInfo[] PROD_SYMBOLS = {
|
||||
static final SymbolInfo[] PROD_SYMBOLS = {
|
||||
new SymbolInfo(false, 3, 5, 8, 8, 1),
|
||||
new SymbolInfo(false, 5, 7, 10, 10, 1),
|
||||
/*rect*/new SymbolInfo(true, 5, 7, 16, 6, 1),
|
||||
|
|
|
@ -31,6 +31,7 @@ import com.google.zxing.multi.qrcode.detector.MultiDetector;
|
|||
import com.google.zxing.qrcode.QRCodeReader;
|
||||
import com.google.zxing.qrcode.decoder.QRCodeDecoderMetaData;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
@ -162,7 +163,7 @@ public final class QRCodeMultiReader extends QRCodeReader implements MultipleBar
|
|||
return newResults;
|
||||
}
|
||||
|
||||
private static final class SAComparator implements Comparator<Result> {
|
||||
private static final class SAComparator implements Comparator<Result>, Serializable {
|
||||
@Override
|
||||
public int compare(Result a, Result b) {
|
||||
int aNumber = (int) (a.getResultMetadata().get(ResultMetadataType.STRUCTURED_APPEND_SEQUENCE));
|
||||
|
|
|
@ -286,7 +286,7 @@ final class DetectionResult {
|
|||
}
|
||||
formatter.format(" %3d|%3d", codeword.getRowNumber(), codeword.getValue());
|
||||
}
|
||||
formatter.format("\n");
|
||||
formatter.format("%n");
|
||||
}
|
||||
String result = formatter.toString();
|
||||
formatter.close();
|
||||
|
|
|
@ -61,12 +61,6 @@ class DetectionResultColumn {
|
|||
return imageRow - boundingBox.getMinY();
|
||||
}
|
||||
|
||||
/*
|
||||
final int codewordIndexToImageRow(int codewordIndex) {
|
||||
return boundingBox.getMinY() + codewordIndex;
|
||||
}
|
||||
*/
|
||||
|
||||
final void setCodeword(int imageRow, Codeword codeword) {
|
||||
codewords[imageRowToCodewordIndex(imageRow)] = codeword;
|
||||
}
|
||||
|
@ -89,10 +83,10 @@ class DetectionResultColumn {
|
|||
int row = 0;
|
||||
for (Codeword codeword : codewords) {
|
||||
if (codeword == null) {
|
||||
formatter.format("%3d: | \n", row++);
|
||||
formatter.format("%3d: | %n", row++);
|
||||
continue;
|
||||
}
|
||||
formatter.format("%3d: %3d|%3d\n", row++, codeword.getRowNumber(), codeword.getValue());
|
||||
formatter.format("%3d: %3d|%3d%n", row++, codeword.getRowNumber(), codeword.getValue());
|
||||
}
|
||||
String result = formatter.toString();
|
||||
formatter.close();
|
||||
|
|
|
@ -187,7 +187,7 @@ public final class PDF417ScanningDecoder {
|
|||
return rightRowIndicatorColumn == null ? null : rightRowIndicatorColumn.getBarcodeMetadata();
|
||||
}
|
||||
if (rightRowIndicatorColumn == null || rightRowIndicatorColumn.getBarcodeMetadata() == null) {
|
||||
return leftRowIndicatorColumn == null ? null : leftRowIndicatorColumn.getBarcodeMetadata();
|
||||
return leftRowIndicatorColumn.getBarcodeMetadata();
|
||||
}
|
||||
BarcodeMetadata leftBarcodeMetadata = leftRowIndicatorColumn.getBarcodeMetadata();
|
||||
BarcodeMetadata rightBarcodeMetadata = rightRowIndicatorColumn.getBarcodeMetadata();
|
||||
|
@ -612,7 +612,7 @@ public final class PDF417ScanningDecoder {
|
|||
barcodeValue.getConfidence(barcodeValue.getValue()[0]));
|
||||
}
|
||||
}
|
||||
formatter.format("\n");
|
||||
formatter.format("%n");
|
||||
}
|
||||
String result = formatter.toString();
|
||||
formatter.close();
|
||||
|
|
Loading…
Reference in a new issue