mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
In extreme decoder failure case, make sure not to let an IAE propagate up. Turn it into ReaderException.
git-svn-id: https://zxing.googlecode.com/svn/trunk@911 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
c6fee110c6
commit
d08ddbe733
|
@ -97,7 +97,11 @@ public final class Version {
|
||||||
if (dimension % 4 != 1) {
|
if (dimension % 4 != 1) {
|
||||||
throw ReaderException.getInstance();
|
throw ReaderException.getInstance();
|
||||||
}
|
}
|
||||||
return getVersionForNumber((dimension - 17) >> 2);
|
try {
|
||||||
|
return getVersionForNumber((dimension - 17) >> 2);
|
||||||
|
} catch (IllegalArgumentException iae) {
|
||||||
|
throw ReaderException.getInstance();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Version getVersionForNumber(int versionNumber) {
|
public static Version getVersionForNumber(int versionNumber) {
|
||||||
|
|
Loading…
Reference in a new issue