From 99db7dabec9a93a40f55eeaba4511e3d1dfa4c69 Mon Sep 17 00:00:00 2001 From: "srowen@gmail.com" Date: Tue, 30 Apr 2013 18:47:13 +0000 Subject: [PATCH] Suppress some spurious warnings and allow javac lint git-svn-id: https://zxing.googlecode.com/svn/trunk@2701 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- core/src/com/google/zxing/oned/MultiFormatOneDReader.java | 1 + core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java | 2 ++ pom.xml | 3 +++ 3 files changed, 6 insertions(+) diff --git a/core/src/com/google/zxing/oned/MultiFormatOneDReader.java b/core/src/com/google/zxing/oned/MultiFormatOneDReader.java index ee869501f..5120438ea 100644 --- a/core/src/com/google/zxing/oned/MultiFormatOneDReader.java +++ b/core/src/com/google/zxing/oned/MultiFormatOneDReader.java @@ -39,6 +39,7 @@ public final class MultiFormatOneDReader extends OneDReader { private final OneDReader[] readers; public MultiFormatOneDReader(Map hints) { + @SuppressWarnings("unchecked") Collection possibleFormats = hints == null ? null : (Collection) hints.get(DecodeHintType.POSSIBLE_FORMATS); boolean useCode39CheckDigit = hints != null && diff --git a/core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java b/core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java index f0d29fc79..452bed59c 100644 --- a/core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java +++ b/core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java @@ -40,6 +40,7 @@ public final class MultiFormatUPCEANReader extends OneDReader { private final UPCEANReader[] readers; public MultiFormatUPCEANReader(Map hints) { + @SuppressWarnings("unchecked") Collection possibleFormats = hints == null ? null : (Collection) hints.get(DecodeHintType.POSSIBLE_FORMATS); Collection readers = new ArrayList(); @@ -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 possibleFormats = hints == null ? null : (Collection) hints.get(DecodeHintType.POSSIBLE_FORMATS); boolean canReturnUPCA = possibleFormats == null || possibleFormats.contains(BarcodeFormat.UPC_A); diff --git a/pom.xml b/pom.xml index be45a6cde..0ab16f616 100644 --- a/pom.xml +++ b/pom.xml @@ -82,6 +82,9 @@ 1.6 1.6 + + -Xlint:all +