mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Suppress some spurious warnings and allow javac lint
git-svn-id: https://zxing.googlecode.com/svn/trunk@2701 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
82d0101e42
commit
99db7dabec
|
@ -39,6 +39,7 @@ public final class MultiFormatOneDReader extends OneDReader {
|
|||
private final OneDReader[] readers;
|
||||
|
||||
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Collection<BarcodeFormat> possibleFormats = hints == null ? null :
|
||||
(Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
|
||||
boolean useCode39CheckDigit = hints != null &&
|
||||
|
|
|
@ -40,6 +40,7 @@ public final class MultiFormatUPCEANReader extends OneDReader {
|
|||
private final UPCEANReader[] readers;
|
||||
|
||||
public MultiFormatUPCEANReader(Map<DecodeHintType,?> hints) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Collection<BarcodeFormat> possibleFormats = hints == null ? null :
|
||||
(Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
|
||||
Collection<UPCEANReader> readers = new ArrayList<UPCEANReader>();
|
||||
|
@ -93,6 +94,7 @@ public final class MultiFormatUPCEANReader extends OneDReader {
|
|||
boolean ean13MayBeUPCA =
|
||||
result.getBarcodeFormat() == BarcodeFormat.EAN_13 &&
|
||||
result.getText().charAt(0) == '0';
|
||||
@SuppressWarnings("unchecked")
|
||||
Collection<BarcodeFormat> possibleFormats =
|
||||
hints == null ? null : (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
|
||||
boolean canReturnUPCA = possibleFormats == null || possibleFormats.contains(BarcodeFormat.UPC_A);
|
||||
|
|
Loading…
Reference in a new issue