Small style stuff
[zxing.git] / core / src / com / google / zxing / qrcode / detector / AlignmentPatternFinder.java
index df158b6..c85cd72 100644 (file)
@@ -16,7 +16,7 @@
 \r
 package com.google.zxing.qrcode.detector;\r
 \r
-import com.google.zxing.ReaderException;\r
+import com.google.zxing.NotFoundException;\r
 import com.google.zxing.ResultPoint;\r
 import com.google.zxing.ResultPointCallback;\r
 import com.google.zxing.common.BitMatrix;\r
@@ -82,9 +82,9 @@ final class AlignmentPatternFinder {
    * it's pretty performance-critical and so is written to be fast foremost.</p>\r
    *\r
    * @return {@link AlignmentPattern} if found\r
-   * @throws ReaderException if not found\r
+   * @throws NotFoundException if not found\r
    */\r
-  AlignmentPattern find() throws ReaderException {\r
+  AlignmentPattern find() throws NotFoundException {\r
     int startX = this.startX;\r
     int height = this.height;\r
     int maxJ = startX + width;\r
@@ -150,7 +150,7 @@ final class AlignmentPatternFinder {
       return (AlignmentPattern) possibleCenters.elementAt(0);\r
     }\r
 \r
-    throw ReaderException.getInstance();\r
+    throw NotFoundException.getNotFoundInstance();\r
   }\r
 \r
   /**\r
@@ -234,7 +234,7 @@ final class AlignmentPatternFinder {
     }\r
 \r
     int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2];\r
-    if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= originalStateCountTotal) {\r
+    if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {\r
       return Float.NaN;\r
     }\r
 \r
@@ -276,4 +276,4 @@ final class AlignmentPatternFinder {
     return null;\r
   }\r
 \r
-}
\ No newline at end of file
+}\r