Caught a few J2ME incompatibilities in build
git-svn-id: https://zxing.googlecode.com/svn/trunk@1235 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/core/src/com/google/zxing/common/GridSampler.java b/core/src/com/google/zxing/common/GridSampler.java
index 84024be..3b55eb6 100644
--- a/core/src/com/google/zxing/common/GridSampler.java
+++ b/core/src/com/google/zxing/common/GridSampler.java
@@ -95,7 +95,7 @@
public BitMatrix sampleGrid(BitMatrix image,
int dimension,
PerspectiveTransform transform) throws NotFoundException {
- throw new UnsupportedOperationException();
+ throw new IllegalStateException(); // Can't use UnsupportedOperationException
}
diff --git a/core/src/com/google/zxing/oned/rss/RSS14Reader.java b/core/src/com/google/zxing/oned/rss/RSS14Reader.java
index 962026c..c9f84c3 100644
--- a/core/src/com/google/zxing/oned/rss/RSS14Reader.java
+++ b/core/src/com/google/zxing/oned/rss/RSS14Reader.java
@@ -81,12 +81,12 @@
public Result decodeRow(int rowNumber, BitArray row, Hashtable hints) throws NotFoundException {
Pair leftPair = decodePair(row, false, rowNumber, hints);
if (leftPair != null) {
- possibleLeftPairs.add(leftPair);
+ possibleLeftPairs.addElement(leftPair);
}
row.reverse();
Pair rightPair = decodePair(row, true, rowNumber, hints);
if (rightPair != null) {
- possibleRightPairs.add(rightPair);
+ possibleRightPairs.addElement(rightPair);
}
row.reverse();
int numLeftPairs = possibleLeftPairs.size();
@@ -104,8 +104,8 @@
}
public void reset() {
- possibleLeftPairs.clear();
- possibleRightPairs.clear();
+ possibleLeftPairs.setSize(0);
+ possibleRightPairs.setSize(0);
}
private static Result constructResult(Pair leftPair, Pair rightPair) {