X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fdatamatrix%2Fdecoder%2FBitMatrixParser.java;h=45ffd2d04bdcf48c688c8848682135c8b512f4b4;hp=c8210b4314a46102ef97f4992f43c401292be4fb;hb=d0920ceb07da310eb8e10f6a11d5590bcb3184ea;hpb=386c120eaa0adb7ec10631fdc84f428832f158a2 diff --git a/core/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java b/core/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java index c8210b43..45ffd2d0 100644 --- a/core/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java +++ b/core/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java @@ -43,6 +43,10 @@ final class BitMatrixParser { this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getWidth(), this.mappingBitMatrix.getHeight()); } + Version getVersion() { + return version; + } + /** *

Creates the version object based on the dimension of the original bit matrix from * the datamatrix code.

@@ -54,15 +58,9 @@ final class BitMatrixParser { * @throws FormatException if the dimensions of the mapping matrix are not valid * Data Matrix dimensions. */ - Version readVersion(BitMatrix bitMatrix) throws FormatException { - - if (version != null) { - return version; - } - + private static Version readVersion(BitMatrix bitMatrix) throws FormatException { int numRows = bitMatrix.getHeight(); int numColumns = bitMatrix.getWidth(); - return Version.getVersionForDimensions(numRows, numColumns); }