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:
srowen 2011-10-08 10:38:07 +00:00
parent b5be6c68cf
commit b6128650bb
18 changed files with 41 additions and 41 deletions

View file

@ -163,7 +163,7 @@ namespace com.google.zxing
{
return reader.decode(image, hints);
}
catch (ReaderException re)
catch (ReaderException)
{
// continue
}
@ -172,4 +172,4 @@ namespace com.google.zxing
throw ReaderException.Instance;
}
}
}
}

View file

@ -68,11 +68,11 @@ namespace com.google.zxing.client.result
altitude = System.Double.Parse(geoURIWithoutQuery.Substring(longitudeEnd + 1));
}
}
catch (System.FormatException nfe)
catch (System.FormatException)
{
return null;
}
return new GeoParsedResult(rawText.StartsWith("GEO:")?"geo:" + rawText.Substring(4):rawText, latitude, longitude, altitude);
}
}
}
}

View file

@ -58,10 +58,10 @@ namespace com.google.zxing.client.result
{
return new CalendarParsedResult(summary, start, end, null, null, null);
}
catch (System.ArgumentException iae)
catch (System.ArgumentException)
{
return null;
}
}
}
}
}

View file

@ -149,7 +149,7 @@ namespace com.google.zxing.common
int offset = y * width;
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;
}
}
}
}

View file

@ -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
// 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;
}
}
}
}

View file

@ -138,7 +138,7 @@ namespace com.google.zxing.datamatrix.decoder
{
rsDecoder.decode(codewordsInts, numECCodewords);
}
catch (ReedSolomonException rse)
catch (ReedSolomonException)
{
throw ReaderException.Instance;
}
@ -150,4 +150,4 @@ namespace com.google.zxing.datamatrix.decoder
}
}
}
}
}

View file

@ -59,7 +59,7 @@ namespace com.google.zxing.multi
{
return delegate_Renamed.decode(topLeft, hints);
}
catch (ReaderException re)
catch (ReaderException)
{
// continue
}
@ -69,7 +69,7 @@ namespace com.google.zxing.multi
{
return delegate_Renamed.decode(topRight, hints);
}
catch (ReaderException re)
catch (ReaderException)
{
// continue
}
@ -79,7 +79,7 @@ namespace com.google.zxing.multi
{
return delegate_Renamed.decode(bottomLeft, hints);
}
catch (ReaderException re)
catch (ReaderException)
{
// continue
}
@ -89,7 +89,7 @@ namespace com.google.zxing.multi
{
return delegate_Renamed.decode(bottomRight, hints);
}
catch (ReaderException re)
catch (ReaderException)
{
// continue
}
@ -100,4 +100,4 @@ namespace com.google.zxing.multi
return delegate_Renamed.decode(center, hints);
}
}
}
}

View file

@ -81,7 +81,7 @@ namespace com.google.zxing.multi
{
result = delegate_Renamed.decode(image, hints);
}
catch (ReaderException re)
catch (ReaderException)
{
return ;
}
@ -172,4 +172,4 @@ namespace com.google.zxing.multi
return new Result(result.Text, result.RawBytes, newResultPoints, result.BarcodeFormat);
}
}
}
}

View file

@ -70,7 +70,7 @@ namespace com.google.zxing.multi.qrcode
}
results.Add(result);
}
catch (ReaderException re)
catch (ReaderException)
{
// ignore and continue
}
@ -90,4 +90,4 @@ namespace com.google.zxing.multi.qrcode
}
}
}
}
}

View file

@ -61,7 +61,7 @@ namespace com.google.zxing.multi.qrcode.detector
{
result.Add(processFinderPatternInfo(info[i]));
}
catch (ReaderException e)
catch (ReaderException)
{
// ignore
}
@ -81,4 +81,4 @@ namespace com.google.zxing.multi.qrcode.detector
}
}
}
}
}

View file

@ -77,7 +77,7 @@ namespace com.google.zxing.oned
{
return reader.decodeRow(rowNumber, row, hints);
}
catch (ReaderException re)
catch (ReaderException)
{
// continue
}
@ -86,4 +86,4 @@ namespace com.google.zxing.oned
throw ReaderException.Instance;
}
}
}
}

View file

@ -82,7 +82,7 @@ namespace com.google.zxing.oned
{
result = reader.decodeRow(rowNumber, row, startGuardPattern, hints);
}
catch (ReaderException re)
catch (ReaderException)
{
continue;
}
@ -106,4 +106,4 @@ namespace com.google.zxing.oned
throw ReaderException.Instance;
}
}
}
}

View file

@ -139,7 +139,7 @@ namespace com.google.zxing.oned
{
row = image.getBlackRow(rowNumber, row);
}
catch (ReaderException re)
catch (ReaderException)
{
continue;
}
@ -189,7 +189,7 @@ namespace com.google.zxing.oned
}
return result;
}
catch (ReaderException re)
catch (ReaderException)
{
// 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>
public abstract Result decodeRow(int rowNumber, BitArray row, System.Collections.Hashtable hints);
}
}
}

View file

@ -72,7 +72,7 @@ namespace com.google.zxing.qrcode.decoder
{
mode = Mode.forBits(bits.readBits(4)); // mode is encoded by 4 bits
}
catch (System.ArgumentException iae)
catch (System.ArgumentException)
{
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'"
result.Append(System.Text.Encoding.GetEncoding(SHIFT_JIS).GetString(SupportClass.ToByteArray(buffer)));
}
catch (System.IO.IOException uee)
catch (System.IO.IOException)
{
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'"
result.Append(System.Text.Encoding.GetEncoding(encoding).GetString(SupportClass.ToByteArray(readBytes)));
}
catch (System.IO.IOException uce)
catch (System.IO.IOException)
{
throw ReaderException.Instance;
}

View file

@ -138,7 +138,7 @@ namespace com.google.zxing.qrcode.decoder
{
rsDecoder.decode(codewordsInts, numECCodewords);
}
catch (ReedSolomonException rse)
catch (ReedSolomonException)
{
throw ReaderException.Instance;
}
@ -150,4 +150,4 @@ namespace com.google.zxing.qrcode.decoder
}
}
}
}
}

View file

@ -118,7 +118,7 @@ namespace com.google.zxing.qrcode.decoder
{
return getVersionForNumber((dimension - 17) >> 2);
}
catch (System.ArgumentException iae)
catch (System.ArgumentException)
{
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)))};
}
}
}
}

View file

@ -135,7 +135,7 @@ namespace com.google.zxing.qrcode.detector
alignmentPattern = findAlignmentInRegion(moduleSize, estAlignmentX, estAlignmentY, (float) i);
break;
}
catch (ReaderException re)
catch (ReaderException)
{
// try next round
}
@ -417,4 +417,4 @@ namespace com.google.zxing.qrcode.detector
return (int) (d + 0.5f);
}
}
}
}

View file

@ -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'"
bytes = SupportClass.ToSByteArray(System.Text.Encoding.GetEncoding("Shift_JIS").GetBytes(content));
}
catch (System.IO.IOException uee)
catch (System.IO.IOException)
{
return false;
}
@ -639,4 +639,4 @@ namespace com.google.zxing.qrcode.encoder
bits.appendBits(eci.Value, 8);
}
}
}
}