mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Only allocate a StringBuffer if the start pattern has been found successfully in the ITFReader.
git-svn-id: https://zxing.googlecode.com/svn/trunk@958 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
0827af1d89
commit
932715065b
|
@ -77,14 +77,12 @@ public final class ITFReader extends AbstractOneDReader {
|
|||
|
||||
public Result decodeRow(int rowNumber, BitArray row, Hashtable hints) throws ReaderException {
|
||||
|
||||
StringBuffer result = new StringBuffer(20);
|
||||
|
||||
// Find out where the Middle section (payload) starts & ends
|
||||
int[] startRange = decodeStart(row);
|
||||
int[] endRange = decodeEnd(row);
|
||||
|
||||
StringBuffer result = new StringBuffer(20);
|
||||
decodeMiddle(row, startRange[1], endRange[0], result);
|
||||
|
||||
String resultString = result.toString();
|
||||
|
||||
int[] allowedLengths = null;
|
||||
|
|
Loading…
Reference in a new issue