From 56c4b6a94d5a9a1a16b04538fcf6ec5d82ed875d Mon Sep 17 00:00:00 2001 From: srowen Date: Thu, 12 Jun 2008 15:55:42 +0000 Subject: [PATCH] Added build-optimized target to produce optimized core.jar; tests now test optimized version; also removed the dependency from core to MIDP 2.0 as it was just depending on silly IllegalStateException git-svn-id: https://zxing.googlecode.com/svn/trunk@423 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- core/build.xml | 27 +++++++++++++++---- .../google/zxing/MonochromeBitmapSource.java | 2 +- .../common/BaseMonochromeBitmapSource.java | 2 +- .../zxing/datamatrix/decoder/DataBlock.java | 2 +- .../zxing/qrcode/decoder/DataBlock.java | 4 +-- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/core/build.xml b/core/build.xml index 7fe5fe803..c76c70993 100644 --- a/core/build.xml +++ b/core/build.xml @@ -23,7 +23,6 @@ - @@ -46,7 +45,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -60,7 +77,7 @@ debug="true" deprecation="true"> - + @@ -71,7 +88,7 @@ - + @@ -92,7 +109,7 @@ - + diff --git a/core/src/com/google/zxing/MonochromeBitmapSource.java b/core/src/com/google/zxing/MonochromeBitmapSource.java index ccecbd373..b828b94bc 100644 --- a/core/src/com/google/zxing/MonochromeBitmapSource.java +++ b/core/src/com/google/zxing/MonochromeBitmapSource.java @@ -103,7 +103,7 @@ public interface MonochromeBitmapSource { * of this class which are only used in resource-constrained mobile environments * don't have a need to implement this.

* - * @throws IllegalStateException if not supported + * @throws IllegalArgumentException if not supported */ MonochromeBitmapSource rotateCounterClockwise(); diff --git a/core/src/com/google/zxing/common/BaseMonochromeBitmapSource.java b/core/src/com/google/zxing/common/BaseMonochromeBitmapSource.java index e6906b408..559dbefe6 100644 --- a/core/src/com/google/zxing/common/BaseMonochromeBitmapSource.java +++ b/core/src/com/google/zxing/common/BaseMonochromeBitmapSource.java @@ -112,7 +112,7 @@ public abstract class BaseMonochromeBitmapSource implements MonochromeBitmapSour } public MonochromeBitmapSource rotateCounterClockwise() { - throw new IllegalStateException("Rotate not supported"); + throw new IllegalArgumentException("Rotate not supported"); } public boolean isRotateSupported() { diff --git a/core/src/com/google/zxing/datamatrix/decoder/DataBlock.java b/core/src/com/google/zxing/datamatrix/decoder/DataBlock.java index 4bcbb3a7a..009fb00d7 100644 --- a/core/src/com/google/zxing/datamatrix/decoder/DataBlock.java +++ b/core/src/com/google/zxing/datamatrix/decoder/DataBlock.java @@ -101,7 +101,7 @@ final class DataBlock { } if (rawCodewordsOffset != rawCodewords.length) { - throw new IllegalStateException(); + throw new IllegalArgumentException(); } return result; diff --git a/core/src/com/google/zxing/qrcode/decoder/DataBlock.java b/core/src/com/google/zxing/qrcode/decoder/DataBlock.java index 995a0d60b..50fadd13e 100755 --- a/core/src/com/google/zxing/qrcode/decoder/DataBlock.java +++ b/core/src/com/google/zxing/qrcode/decoder/DataBlock.java @@ -80,7 +80,7 @@ final class DataBlock { break; } if (numCodewords != shorterBlocksTotalCodewords + 1) { - throw new IllegalStateException("Data block sizes differ by more than 1"); + throw new IllegalArgumentException("Data block sizes differ by more than 1"); } longerBlocksStartAt--; } @@ -109,7 +109,7 @@ final class DataBlock { } if (rawCodewordsOffset != rawCodewords.length) { - throw new IllegalStateException(); + throw new IllegalArgumentException(); } return result;