diff --git a/android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java b/android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java index d5628e872..4eb5681d2 100644 --- a/android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java +++ b/android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java @@ -97,7 +97,7 @@ import android.util.Log; *

Enabling experimental barcode formats

* *

Some formats are not enabled by default even when scanning with {@link #ALL_CODE_TYPES}, such as - * PDF417. Use {@link #initiateScan(java.util.Collection)} with + * PDF417. Use {@link #initiateScan(Collection)} with * a collection containing the names of formats to scan for explicitly, like "PDF_417", to use such * formats.

* @@ -332,8 +332,8 @@ public class IntentIntegrator { * * @param intent Intent to start. * @param code Request code for the activity - * @see android.app.Activity#startActivityForResult(Intent, int) - * @see android.app.Fragment#startActivityForResult(Intent, int) + * @see Activity#startActivityForResult(Intent, int) + * @see Fragment#startActivityForResult(Intent, int) */ protected void startActivityForResult(Intent intent, int code) { if (fragment == null) { diff --git a/android/src/com/google/zxing/client/android/CaptureActivity.java b/android/src/com/google/zxing/client/android/CaptureActivity.java index ee33b58c7..e4d9cb1e7 100755 --- a/android/src/com/google/zxing/client/android/CaptureActivity.java +++ b/android/src/com/google/zxing/client/android/CaptureActivity.java @@ -88,7 +88,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal private static final String[] ZXING_URLS = { "http://zxing.appspot.com/scan", "zxing://scan/" }; - public static final int HISTORY_REQUEST_CODE = 0x0000bacc; + private static final int HISTORY_REQUEST_CODE = 0x0000bacc; private static final Collection DISPLAYABLE_METADATA_TYPES = EnumSet.of(ResultMetadataType.ISSUE_NUMBER, diff --git a/android/src/com/google/zxing/client/android/LocaleManager.java b/android/src/com/google/zxing/client/android/LocaleManager.java index e74f51d6c..c585ab7b9 100644 --- a/android/src/com/google/zxing/client/android/LocaleManager.java +++ b/android/src/com/google/zxing/client/android/LocaleManager.java @@ -166,7 +166,7 @@ public final class LocaleManager { return language; } - public static String getTranslatedAssetLanguage() { + static String getTranslatedAssetLanguage() { String language = getSystemLanguage(); return TRANSLATED_HELP_ASSET_LANGUAGES.contains(language) ? language : DEFAULT_LANGUAGE; } @@ -176,7 +176,7 @@ public final class LocaleManager { return tld == null ? DEFAULT_TLD : tld; } - public static String getCountry(Context context) { + private static String getCountry(Context context) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); String countryOverride = prefs.getString(PreferencesActivity.KEY_SEARCH_COUNTRY, "-"); if (countryOverride != null && !countryOverride.isEmpty() && !"-".equals(countryOverride)) { diff --git a/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java b/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java index a18e37e22..326957e1b 100644 --- a/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java +++ b/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java @@ -220,7 +220,7 @@ final class CameraConfigurationManager { if (camera != null) { Camera.Parameters parameters = camera.getParameters(); if (parameters != null) { - String flashMode = camera.getParameters().getFlashMode(); + String flashMode = parameters.getFlashMode(); return flashMode != null && (Camera.Parameters.FLASH_MODE_ON.equals(flashMode) || Camera.Parameters.FLASH_MODE_TORCH.equals(flashMode)); diff --git a/androidtest/src/com/google/zxing/client/androidtest/ZXingTestActivity.java b/androidtest/src/com/google/zxing/client/androidtest/ZXingTestActivity.java index 3c66fb171..6eacae13b 100755 --- a/androidtest/src/com/google/zxing/client/androidtest/ZXingTestActivity.java +++ b/androidtest/src/com/google/zxing/client/androidtest/ZXingTestActivity.java @@ -106,8 +106,7 @@ public final class ZXingTestActivity extends Activity { public void onActivityResult(int requestCode, int resultCode, Intent intent) { IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent); if (result != null) { - String contents = result.getContents(); - if (contents != null) { + if (result.getContents() != null) { showDialog(R.string.result_succeeded, result.toString()); } else { showDialog(R.string.result_failed, getString(R.string.result_failed_why)); diff --git a/core/src/main/java/com/google/zxing/Reader.java b/core/src/main/java/com/google/zxing/Reader.java index 7208c94d9..fc5064a6f 100644 --- a/core/src/main/java/com/google/zxing/Reader.java +++ b/core/src/main/java/com/google/zxing/Reader.java @@ -48,7 +48,7 @@ public interface Reader { * hints, each possibly associated to some data, which may help the implementation decode. * * @param image image of barcode to decode - * @param hints passed as a {@link java.util.Map} from {@link DecodeHintType} + * @param hints passed as a {@link Map} from {@link DecodeHintType} * to arbitrary data. The * meaning of the data depends upon the hint type. The implementation may or may not do * anything with these hints. diff --git a/core/src/main/java/com/google/zxing/common/detector/MonochromeRectangleDetector.java b/core/src/main/java/com/google/zxing/common/detector/MonochromeRectangleDetector.java index 6f58452cc..3fec9bc31 100644 --- a/core/src/main/java/com/google/zxing/common/detector/MonochromeRectangleDetector.java +++ b/core/src/main/java/com/google/zxing/common/detector/MonochromeRectangleDetector.java @@ -94,7 +94,7 @@ public final class MonochromeRectangleDetector { * @param bottom maximum value of y * @param maxWhiteRun maximum run of white pixels that can still be considered to be within * the barcode - * @return a {@link com.google.zxing.ResultPoint} encapsulating the corner that was found + * @return a {@link ResultPoint} encapsulating the corner that was found * @throws NotFoundException if such a point cannot be found */ private ResultPoint findCornerFromCenter(int centerX, diff --git a/core/src/main/java/com/google/zxing/common/detector/WhiteRectangleDetector.java b/core/src/main/java/com/google/zxing/common/detector/WhiteRectangleDetector.java index 9e0cce0fc..1d03681ac 100644 --- a/core/src/main/java/com/google/zxing/common/detector/WhiteRectangleDetector.java +++ b/core/src/main/java/com/google/zxing/common/detector/WhiteRectangleDetector.java @@ -192,11 +192,8 @@ public final class WhiteRectangleDetector { int maxSize = right - left; ResultPoint z = null; - for (int i = 1; i < maxSize; i++) { + for (int i = 1; z == null && i < maxSize; i++) { z = getBlackPointOnSegment(left, down - i, left + i, down); - if (z != null) { - break; - } } if (z == null) { @@ -205,11 +202,8 @@ public final class WhiteRectangleDetector { ResultPoint t = null; //go down right - for (int i = 1; i < maxSize; i++) { + for (int i = 1; t == null && i < maxSize; i++) { t = getBlackPointOnSegment(left, up + i, left + i, up); - if (t != null) { - break; - } } if (t == null) { @@ -218,11 +212,8 @@ public final class WhiteRectangleDetector { ResultPoint x = null; //go down left - for (int i = 1; i < maxSize; i++) { + for (int i = 1; x == null && i < maxSize; i++) { x = getBlackPointOnSegment(right, up + i, right - i, up); - if (x != null) { - break; - } } if (x == null) { @@ -231,11 +222,8 @@ public final class WhiteRectangleDetector { ResultPoint y = null; //go up left - for (int i = 1; i < maxSize; i++) { + for (int i = 1; y == null && i < maxSize; i++) { y = getBlackPointOnSegment(right, down - i, right - i, down); - if (y != null) { - break; - } } if (y == null) { diff --git a/core/src/main/java/com/google/zxing/oned/UPCEANReader.java b/core/src/main/java/com/google/zxing/oned/UPCEANReader.java index 08992b1c8..101a9c007 100644 --- a/core/src/main/java/com/google/zxing/oned/UPCEANReader.java +++ b/core/src/main/java/com/google/zxing/oned/UPCEANReader.java @@ -132,7 +132,7 @@ public abstract class UPCEANReader extends OneDReader { } /** - *

Like {@link #decodeRow(int, BitArray, java.util.Map)}, but + *

Like {@link #decodeRow(int, BitArray, Map)}, but * allows caller to inform method about where the UPC/EAN start pattern is * found. This allows this to be computed once and reused across many implementations.

* diff --git a/zxingorg/pom.xml b/zxingorg/pom.xml index 591b069c7..b1b013a7c 100644 --- a/zxingorg/pom.xml +++ b/zxingorg/pom.xml @@ -60,7 +60,7 @@ org.eclipse.jetty jetty-maven-plugin - 9.4.0.M0 + 9.4.0.M1