Add minimal support for FNC1 mode in QR Code
[zxing.git] / core / src / com / google / zxing / qrcode / decoder / DataBlock.java
index 995a0d6..7cbf406 100755 (executable)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright 2007 Google Inc.\r
+ * Copyright 2007 ZXing authors\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -80,7 +80,7 @@ final class DataBlock {
         break;\r
       }\r
       if (numCodewords != shorterBlocksTotalCodewords + 1) {\r
-        throw new IllegalStateException("Data block sizes differ by more than 1");\r
+        throw new IllegalArgumentException("Data block sizes differ by more than 1");\r
       }\r
       longerBlocksStartAt--;\r
     }\r
@@ -109,7 +109,7 @@ final class DataBlock {
     }\r
 \r
     if (rawCodewordsOffset != rawCodewords.length) {\r
-      throw new IllegalStateException();\r
+      throw new IllegalArgumentException();\r
     }\r
 \r
     return result;\r