Small style stuff
[zxing.git] / core / src / com / google / zxing / datamatrix / decoder / BitMatrixParser.java
index c8210b4..45ffd2d 100644 (file)
@@ -43,6 +43,10 @@ final class BitMatrixParser {
     this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getWidth(), this.mappingBitMatrix.getHeight());\r
   }\r
 \r
     this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getWidth(), this.mappingBitMatrix.getHeight());\r
   }\r
 \r
+  Version getVersion() {\r
+    return version;\r
+  }\r
+\r
   /**\r
    * <p>Creates the version object based on the dimension of the original bit matrix from \r
    * the datamatrix code.</p>\r
   /**\r
    * <p>Creates the version object based on the dimension of the original bit matrix from \r
    * the datamatrix code.</p>\r
@@ -54,15 +58,9 @@ final class BitMatrixParser {
    * @throws FormatException if the dimensions of the mapping matrix are not valid\r
    * Data Matrix dimensions.\r
    */\r
    * @throws FormatException if the dimensions of the mapping matrix are not valid\r
    * Data Matrix dimensions.\r
    */\r
-  Version readVersion(BitMatrix bitMatrix) throws FormatException {\r
-\r
-    if (version != null) {\r
-      return version;\r
-    }\r
-\r
+  private static Version readVersion(BitMatrix bitMatrix) throws FormatException {\r
     int numRows = bitMatrix.getHeight();\r
     int numColumns = bitMatrix.getWidth();\r
     int numRows = bitMatrix.getHeight();\r
     int numColumns = bitMatrix.getWidth();\r
-    \r
     return Version.getVersionForDimensions(numRows, numColumns);\r
   }\r
 \r
     return Version.getVersionForDimensions(numRows, numColumns);\r
   }\r
 \r