mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue 1009 typo fix; remove unused catch variables
git-svn-id: https://zxing.googlecode.com/svn/trunk@1951 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
b5be6c68cf
commit
b6128650bb
|
@ -163,7 +163,7 @@ namespace com.google.zxing
|
||||||
{
|
{
|
||||||
return reader.decode(image, hints);
|
return reader.decode(image, hints);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
@ -172,4 +172,4 @@ namespace com.google.zxing
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,11 +68,11 @@ namespace com.google.zxing.client.result
|
||||||
altitude = System.Double.Parse(geoURIWithoutQuery.Substring(longitudeEnd + 1));
|
altitude = System.Double.Parse(geoURIWithoutQuery.Substring(longitudeEnd + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.FormatException nfe)
|
catch (System.FormatException)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new GeoParsedResult(rawText.StartsWith("GEO:")?"geo:" + rawText.Substring(4):rawText, latitude, longitude, altitude);
|
return new GeoParsedResult(rawText.StartsWith("GEO:")?"geo:" + rawText.Substring(4):rawText, latitude, longitude, altitude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,10 +58,10 @@ namespace com.google.zxing.client.result
|
||||||
{
|
{
|
||||||
return new CalendarParsedResult(summary, start, end, null, null, null);
|
return new CalendarParsedResult(summary, start, end, null, null, null);
|
||||||
}
|
}
|
||||||
catch (System.ArgumentException iae)
|
catch (System.ArgumentException)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ namespace com.google.zxing.common
|
||||||
int offset = y * width;
|
int offset = y * width;
|
||||||
for (int x = 0; x < width; x++)
|
for (int x = 0; x < width; x++)
|
||||||
{
|
{
|
||||||
ixels[offset + x] = array[y][x] == 0 ? BLACK : WHITE;
|
pixels[offset + x] = array[y][x] == 0 ? BLACK : WHITE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,4 +171,4 @@ namespace com.google.zxing.common
|
||||||
return bmp;
|
return bmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace com.google.zxing.common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.IndexOutOfRangeException aioobe)
|
catch (System.IndexOutOfRangeException)
|
||||||
{
|
{
|
||||||
// This feels wrong, but, sometimes if the finder patterns are misidentified, the resulting
|
// This feels wrong, but, sometimes if the finder patterns are misidentified, the resulting
|
||||||
// transform gets "twisted" such that it maps a straight line of points to a set of points
|
// transform gets "twisted" such that it maps a straight line of points to a set of points
|
||||||
|
@ -79,4 +79,4 @@ namespace com.google.zxing.common
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ namespace com.google.zxing.datamatrix.decoder
|
||||||
{
|
{
|
||||||
rsDecoder.decode(codewordsInts, numECCodewords);
|
rsDecoder.decode(codewordsInts, numECCodewords);
|
||||||
}
|
}
|
||||||
catch (ReedSolomonException rse)
|
catch (ReedSolomonException)
|
||||||
{
|
{
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
|
@ -150,4 +150,4 @@ namespace com.google.zxing.datamatrix.decoder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace com.google.zxing.multi
|
||||||
{
|
{
|
||||||
return delegate_Renamed.decode(topLeft, hints);
|
return delegate_Renamed.decode(topLeft, hints);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ namespace com.google.zxing.multi
|
||||||
{
|
{
|
||||||
return delegate_Renamed.decode(topRight, hints);
|
return delegate_Renamed.decode(topRight, hints);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ namespace com.google.zxing.multi
|
||||||
{
|
{
|
||||||
return delegate_Renamed.decode(bottomLeft, hints);
|
return delegate_Renamed.decode(bottomLeft, hints);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ namespace com.google.zxing.multi
|
||||||
{
|
{
|
||||||
return delegate_Renamed.decode(bottomRight, hints);
|
return delegate_Renamed.decode(bottomRight, hints);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
@ -100,4 +100,4 @@ namespace com.google.zxing.multi
|
||||||
return delegate_Renamed.decode(center, hints);
|
return delegate_Renamed.decode(center, hints);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace com.google.zxing.multi
|
||||||
{
|
{
|
||||||
result = delegate_Renamed.decode(image, hints);
|
result = delegate_Renamed.decode(image, hints);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
@ -172,4 +172,4 @@ namespace com.google.zxing.multi
|
||||||
return new Result(result.Text, result.RawBytes, newResultPoints, result.BarcodeFormat);
|
return new Result(result.Text, result.RawBytes, newResultPoints, result.BarcodeFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace com.google.zxing.multi.qrcode
|
||||||
}
|
}
|
||||||
results.Add(result);
|
results.Add(result);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// ignore and continue
|
// ignore and continue
|
||||||
}
|
}
|
||||||
|
@ -90,4 +90,4 @@ namespace com.google.zxing.multi.qrcode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace com.google.zxing.multi.qrcode.detector
|
||||||
{
|
{
|
||||||
result.Add(processFinderPatternInfo(info[i]));
|
result.Add(processFinderPatternInfo(info[i]));
|
||||||
}
|
}
|
||||||
catch (ReaderException e)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
@ -81,4 +81,4 @@ namespace com.google.zxing.multi.qrcode.detector
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace com.google.zxing.oned
|
||||||
{
|
{
|
||||||
return reader.decodeRow(rowNumber, row, hints);
|
return reader.decodeRow(rowNumber, row, hints);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
@ -86,4 +86,4 @@ namespace com.google.zxing.oned
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace com.google.zxing.oned
|
||||||
{
|
{
|
||||||
result = reader.decodeRow(rowNumber, row, startGuardPattern, hints);
|
result = reader.decodeRow(rowNumber, row, startGuardPattern, hints);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -106,4 +106,4 @@ namespace com.google.zxing.oned
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ namespace com.google.zxing.oned
|
||||||
{
|
{
|
||||||
row = image.getBlackRow(rowNumber, row);
|
row = image.getBlackRow(rowNumber, row);
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ namespace com.google.zxing.oned
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// continue -- just couldn't decode this row
|
// continue -- just couldn't decode this row
|
||||||
}
|
}
|
||||||
|
@ -329,4 +329,4 @@ namespace com.google.zxing.oned
|
||||||
/// <throws> ReaderException if an error occurs or barcode cannot be found </throws>
|
/// <throws> ReaderException if an error occurs or barcode cannot be found </throws>
|
||||||
public abstract Result decodeRow(int rowNumber, BitArray row, System.Collections.Hashtable hints);
|
public abstract Result decodeRow(int rowNumber, BitArray row, System.Collections.Hashtable hints);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace com.google.zxing.qrcode.decoder
|
||||||
{
|
{
|
||||||
mode = Mode.forBits(bits.readBits(4)); // mode is encoded by 4 bits
|
mode = Mode.forBits(bits.readBits(4)); // mode is encoded by 4 bits
|
||||||
}
|
}
|
||||||
catch (System.ArgumentException iae)
|
catch (System.ArgumentException)
|
||||||
{
|
{
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ namespace com.google.zxing.qrcode.decoder
|
||||||
//UPGRADE_TODO: The differences in the Format of parameters for constructor 'java.lang.String.String' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1092'"
|
//UPGRADE_TODO: The differences in the Format of parameters for constructor 'java.lang.String.String' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1092'"
|
||||||
result.Append(System.Text.Encoding.GetEncoding(SHIFT_JIS).GetString(SupportClass.ToByteArray(buffer)));
|
result.Append(System.Text.Encoding.GetEncoding(SHIFT_JIS).GetString(SupportClass.ToByteArray(buffer)));
|
||||||
}
|
}
|
||||||
catch (System.IO.IOException uee)
|
catch (System.IO.IOException)
|
||||||
{
|
{
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ namespace com.google.zxing.qrcode.decoder
|
||||||
//UPGRADE_TODO: The differences in the Format of parameters for constructor 'java.lang.String.String' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1092'"
|
//UPGRADE_TODO: The differences in the Format of parameters for constructor 'java.lang.String.String' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1092'"
|
||||||
result.Append(System.Text.Encoding.GetEncoding(encoding).GetString(SupportClass.ToByteArray(readBytes)));
|
result.Append(System.Text.Encoding.GetEncoding(encoding).GetString(SupportClass.ToByteArray(readBytes)));
|
||||||
}
|
}
|
||||||
catch (System.IO.IOException uce)
|
catch (System.IO.IOException)
|
||||||
{
|
{
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ namespace com.google.zxing.qrcode.decoder
|
||||||
{
|
{
|
||||||
rsDecoder.decode(codewordsInts, numECCodewords);
|
rsDecoder.decode(codewordsInts, numECCodewords);
|
||||||
}
|
}
|
||||||
catch (ReedSolomonException rse)
|
catch (ReedSolomonException)
|
||||||
{
|
{
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
|
@ -150,4 +150,4 @@ namespace com.google.zxing.qrcode.decoder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ namespace com.google.zxing.qrcode.decoder
|
||||||
{
|
{
|
||||||
return getVersionForNumber((dimension - 17) >> 2);
|
return getVersionForNumber((dimension - 17) >> 2);
|
||||||
}
|
}
|
||||||
catch (System.ArgumentException iae)
|
catch (System.ArgumentException)
|
||||||
{
|
{
|
||||||
throw ReaderException.Instance;
|
throw ReaderException.Instance;
|
||||||
}
|
}
|
||||||
|
@ -317,4 +317,4 @@ namespace com.google.zxing.qrcode.decoder
|
||||||
ECB(14, 25)), new ECBlocks(30, new ECB(22, 15), new ECB(41, 16))), new Version(36, new int[]{6, 24, 50, 76, 102, 128, 154}, new ECBlocks(30, new ECB(6, 121), new ECB(14, 122)), new ECBlocks(28, new ECB(6, 47), new ECB(34, 48)), new ECBlocks(30, new ECB(46, 24), new ECB(10, 25)), new ECBlocks(30, new ECB(2, 15), new ECB(64, 16))), new Version(37, new int[]{6, 28, 54, 80, 106, 132, 158}, new ECBlocks(30, new ECB(17, 122), new ECB(4, 123)), new ECBlocks(28, new ECB(29, 46), new ECB(14, 47)), new ECBlocks(30, new ECB(49, 24), new ECB(10, 25)), new ECBlocks(30, new ECB(24, 15), new ECB(46, 16))), new Version(38, new int[]{6, 32, 58, 84, 110, 136, 162}, new ECBlocks(30, new ECB(4, 122), new ECB(18, 123)), new ECBlocks(28, new ECB(13, 46), new ECB(32, 47)), new ECBlocks(30, new ECB(48, 24), new ECB(14, 25)), new ECBlocks(30, new ECB(42, 15), new ECB(32, 16))), new Version(39, new int[]{6, 26, 54, 82, 110, 138, 166}, new ECBlocks(30, new ECB(20, 117), new ECB(4, 118)), new ECBlocks(28, new ECB(40, 47), new ECB(7, 48)), new ECBlocks(30, new ECB(43, 24), new ECB(22, 25)), new ECBlocks(30, new ECB(10, 15), new ECB(67, 16))), new Version(40, new int[]{6, 30, 58, 86, 114, 142, 170}, new ECBlocks(30, new ECB(19, 118), new ECB(6, 119)), new ECBlocks(28, new ECB(18, 47), new ECB(31, 48)), new ECBlocks(30, new ECB(34, 24), new ECB(34, 25)), new ECBlocks(30, new ECB(20, 15), new ECB(61, 16)))};
|
ECB(14, 25)), new ECBlocks(30, new ECB(22, 15), new ECB(41, 16))), new Version(36, new int[]{6, 24, 50, 76, 102, 128, 154}, new ECBlocks(30, new ECB(6, 121), new ECB(14, 122)), new ECBlocks(28, new ECB(6, 47), new ECB(34, 48)), new ECBlocks(30, new ECB(46, 24), new ECB(10, 25)), new ECBlocks(30, new ECB(2, 15), new ECB(64, 16))), new Version(37, new int[]{6, 28, 54, 80, 106, 132, 158}, new ECBlocks(30, new ECB(17, 122), new ECB(4, 123)), new ECBlocks(28, new ECB(29, 46), new ECB(14, 47)), new ECBlocks(30, new ECB(49, 24), new ECB(10, 25)), new ECBlocks(30, new ECB(24, 15), new ECB(46, 16))), new Version(38, new int[]{6, 32, 58, 84, 110, 136, 162}, new ECBlocks(30, new ECB(4, 122), new ECB(18, 123)), new ECBlocks(28, new ECB(13, 46), new ECB(32, 47)), new ECBlocks(30, new ECB(48, 24), new ECB(14, 25)), new ECBlocks(30, new ECB(42, 15), new ECB(32, 16))), new Version(39, new int[]{6, 26, 54, 82, 110, 138, 166}, new ECBlocks(30, new ECB(20, 117), new ECB(4, 118)), new ECBlocks(28, new ECB(40, 47), new ECB(7, 48)), new ECBlocks(30, new ECB(43, 24), new ECB(22, 25)), new ECBlocks(30, new ECB(10, 15), new ECB(67, 16))), new Version(40, new int[]{6, 30, 58, 86, 114, 142, 170}, new ECBlocks(30, new ECB(19, 118), new ECB(6, 119)), new ECBlocks(28, new ECB(18, 47), new ECB(31, 48)), new ECBlocks(30, new ECB(34, 24), new ECB(34, 25)), new ECBlocks(30, new ECB(20, 15), new ECB(61, 16)))};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ namespace com.google.zxing.qrcode.detector
|
||||||
alignmentPattern = findAlignmentInRegion(moduleSize, estAlignmentX, estAlignmentY, (float) i);
|
alignmentPattern = findAlignmentInRegion(moduleSize, estAlignmentX, estAlignmentY, (float) i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch (ReaderException re)
|
catch (ReaderException)
|
||||||
{
|
{
|
||||||
// try next round
|
// try next round
|
||||||
}
|
}
|
||||||
|
@ -417,4 +417,4 @@ namespace com.google.zxing.qrcode.detector
|
||||||
return (int) (d + 0.5f);
|
return (int) (d + 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ namespace com.google.zxing.qrcode.encoder
|
||||||
//UPGRADE_TODO: Method 'java.lang.String.getBytes' was converted to 'System.Text.Encoding.GetEncoding(string).GetBytes(string)' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javalangStringgetBytes_javalangString'"
|
//UPGRADE_TODO: Method 'java.lang.String.getBytes' was converted to 'System.Text.Encoding.GetEncoding(string).GetBytes(string)' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javalangStringgetBytes_javalangString'"
|
||||||
bytes = SupportClass.ToSByteArray(System.Text.Encoding.GetEncoding("Shift_JIS").GetBytes(content));
|
bytes = SupportClass.ToSByteArray(System.Text.Encoding.GetEncoding("Shift_JIS").GetBytes(content));
|
||||||
}
|
}
|
||||||
catch (System.IO.IOException uee)
|
catch (System.IO.IOException)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -639,4 +639,4 @@ namespace com.google.zxing.qrcode.encoder
|
||||||
bits.appendBits(eci.Value, 8);
|
bits.appendBits(eci.Value, 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue