diff --git a/core/src/com/google/zxing/common/GridSampler.java b/core/src/com/google/zxing/common/GridSampler.java index 84024be46..3b55eb696 100644 --- a/core/src/com/google/zxing/common/GridSampler.java +++ b/core/src/com/google/zxing/common/GridSampler.java @@ -95,7 +95,7 @@ public abstract class GridSampler { 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 962026cc2..c9f84c30e 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 final class RSS14Reader extends OneDReader { 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 final class RSS14Reader extends OneDReader { } public void reset() { - possibleLeftPairs.clear(); - possibleRightPairs.clear(); + possibleLeftPairs.setSize(0); + possibleRightPairs.setSize(0); } private static Result constructResult(Pair leftPair, Pair rightPair) {