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:
srowen@gmail.com 2013-04-30 18:47:13 +00:00
parent 82d0101e42
commit 99db7dabec
3 changed files with 6 additions and 0 deletions

View file

@ -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 &&

View file

@ -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);

View file

@ -82,6 +82,9 @@
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>