Correct a few more things about ECI parsing
[zxing.git] / core / src / com / google / zxing / qrcode / decoder / Mode.java
index 7f1d2f9..d05762f 100644 (file)
@@ -71,8 +71,8 @@ final class Mode {
    *         count of characters that will follow encoded in this {@link Mode}
    */
   int getCharacterCountBits(Version version) {
-    if (this == ECI) {
-      throw new UnsupportedOperationException("Character count doesn't apply to ECI mode");
+    if (this.equals(ECI)) {
+      throw new IllegalArgumentException("Character count doesn't apply to ECI mode");
     }
     int number = version.getVersionNumber();
     int offset;