From b6128650bb126dfcc798fede152f061bd2e487b9 Mon Sep 17 00:00:00 2001 From: srowen Date: Sat, 8 Oct 2011 10:38:07 +0000 Subject: [PATCH] Issue 1009 typo fix; remove unused catch variables git-svn-id: https://zxing.googlecode.com/svn/trunk@1951 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- csharp/MultiFormatReader.cs | 4 ++-- csharp/client/result/GeoResultParser.cs | 4 ++-- csharp/client/result/VEventResultParser.cs | 4 ++-- csharp/common/ByteMatrix.cs | 4 ++-- csharp/common/DefaultGridSampler.cs | 4 ++-- csharp/datamatrix/decoder/Decoder.cs | 4 ++-- csharp/multi/ByQuadrantReader.cs | 10 +++++----- csharp/multi/GenericMultipleBarcodeReader.cs | 4 ++-- csharp/multi/qrcode/QRCodeMultiReader.cs | 4 ++-- csharp/multi/qrcode/detector/MultiDetector.cs | 4 ++-- csharp/oned/MultiFormatOneDReader.cs | 4 ++-- csharp/oned/MultiFormatUPCEANReader.cs | 4 ++-- csharp/oned/OneDReader.cs | 6 +++--- csharp/qrcode/decoder/DecodedBitStreamParser.cs | 6 +++--- csharp/qrcode/decoder/Decoder.cs | 4 ++-- csharp/qrcode/decoder/Version.cs | 4 ++-- csharp/qrcode/detector/Detector.cs | 4 ++-- csharp/qrcode/encoder/Encoder.cs | 4 ++-- 18 files changed, 41 insertions(+), 41 deletions(-) diff --git a/csharp/MultiFormatReader.cs b/csharp/MultiFormatReader.cs index 0c58f9f16..958fb7467 100755 --- a/csharp/MultiFormatReader.cs +++ b/csharp/MultiFormatReader.cs @@ -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; } } -} \ No newline at end of file +} diff --git a/csharp/client/result/GeoResultParser.cs b/csharp/client/result/GeoResultParser.cs index ebfbc5b72..cd2e8498d 100755 --- a/csharp/client/result/GeoResultParser.cs +++ b/csharp/client/result/GeoResultParser.cs @@ -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); } } -} \ No newline at end of file +} diff --git a/csharp/client/result/VEventResultParser.cs b/csharp/client/result/VEventResultParser.cs index 83cfa6309..2b331dd9d 100755 --- a/csharp/client/result/VEventResultParser.cs +++ b/csharp/client/result/VEventResultParser.cs @@ -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; } } } -} \ No newline at end of file +} diff --git a/csharp/common/ByteMatrix.cs b/csharp/common/ByteMatrix.cs index 8b75ddb30..a5ec83630 100755 --- a/csharp/common/ByteMatrix.cs +++ b/csharp/common/ByteMatrix.cs @@ -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; } } -} \ No newline at end of file +} diff --git a/csharp/common/DefaultGridSampler.cs b/csharp/common/DefaultGridSampler.cs index f884dbfb7..1a789cb02 100755 --- a/csharp/common/DefaultGridSampler.cs +++ b/csharp/common/DefaultGridSampler.cs @@ -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; } } -} \ No newline at end of file +} diff --git a/csharp/datamatrix/decoder/Decoder.cs b/csharp/datamatrix/decoder/Decoder.cs index 4901cebc8..c53a27703 100755 --- a/csharp/datamatrix/decoder/Decoder.cs +++ b/csharp/datamatrix/decoder/Decoder.cs @@ -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 } } } -} \ No newline at end of file +} diff --git a/csharp/multi/ByQuadrantReader.cs b/csharp/multi/ByQuadrantReader.cs index a885d98f8..47a69c0a3 100755 --- a/csharp/multi/ByQuadrantReader.cs +++ b/csharp/multi/ByQuadrantReader.cs @@ -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); } } -} \ No newline at end of file +} diff --git a/csharp/multi/GenericMultipleBarcodeReader.cs b/csharp/multi/GenericMultipleBarcodeReader.cs index ba37eb69e..708b84fc3 100755 --- a/csharp/multi/GenericMultipleBarcodeReader.cs +++ b/csharp/multi/GenericMultipleBarcodeReader.cs @@ -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); } } -} \ No newline at end of file +} diff --git a/csharp/multi/qrcode/QRCodeMultiReader.cs b/csharp/multi/qrcode/QRCodeMultiReader.cs index 77def7270..e27f3657d 100755 --- a/csharp/multi/qrcode/QRCodeMultiReader.cs +++ b/csharp/multi/qrcode/QRCodeMultiReader.cs @@ -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 } } } -} \ No newline at end of file +} diff --git a/csharp/multi/qrcode/detector/MultiDetector.cs b/csharp/multi/qrcode/detector/MultiDetector.cs index 2f82f043e..8a7ac856f 100755 --- a/csharp/multi/qrcode/detector/MultiDetector.cs +++ b/csharp/multi/qrcode/detector/MultiDetector.cs @@ -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 } } } -} \ No newline at end of file +} diff --git a/csharp/oned/MultiFormatOneDReader.cs b/csharp/oned/MultiFormatOneDReader.cs index cd81dce78..e058354de 100755 --- a/csharp/oned/MultiFormatOneDReader.cs +++ b/csharp/oned/MultiFormatOneDReader.cs @@ -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; } } -} \ No newline at end of file +} diff --git a/csharp/oned/MultiFormatUPCEANReader.cs b/csharp/oned/MultiFormatUPCEANReader.cs index a801fa60c..fa12ac51b 100755 --- a/csharp/oned/MultiFormatUPCEANReader.cs +++ b/csharp/oned/MultiFormatUPCEANReader.cs @@ -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; } } -} \ No newline at end of file +} diff --git a/csharp/oned/OneDReader.cs b/csharp/oned/OneDReader.cs index bdb768b44..a3d6ccee1 100755 --- a/csharp/oned/OneDReader.cs +++ b/csharp/oned/OneDReader.cs @@ -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 /// ReaderException if an error occurs or barcode cannot be found public abstract Result decodeRow(int rowNumber, BitArray row, System.Collections.Hashtable hints); } -} \ No newline at end of file +} diff --git a/csharp/qrcode/decoder/DecodedBitStreamParser.cs b/csharp/qrcode/decoder/DecodedBitStreamParser.cs index 71ad4edd5..ce3776cf8 100755 --- a/csharp/qrcode/decoder/DecodedBitStreamParser.cs +++ b/csharp/qrcode/decoder/DecodedBitStreamParser.cs @@ -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; } diff --git a/csharp/qrcode/decoder/Decoder.cs b/csharp/qrcode/decoder/Decoder.cs index 976220269..bd6321aee 100755 --- a/csharp/qrcode/decoder/Decoder.cs +++ b/csharp/qrcode/decoder/Decoder.cs @@ -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 } } } -} \ No newline at end of file +} diff --git a/csharp/qrcode/decoder/Version.cs b/csharp/qrcode/decoder/Version.cs index c28be0cdd..853119405 100755 --- a/csharp/qrcode/decoder/Version.cs +++ b/csharp/qrcode/decoder/Version.cs @@ -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)))}; } } -} \ No newline at end of file +} diff --git a/csharp/qrcode/detector/Detector.cs b/csharp/qrcode/detector/Detector.cs index 08f4008b4..0a013e1f1 100755 --- a/csharp/qrcode/detector/Detector.cs +++ b/csharp/qrcode/detector/Detector.cs @@ -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); } } -} \ No newline at end of file +} diff --git a/csharp/qrcode/encoder/Encoder.cs b/csharp/qrcode/encoder/Encoder.cs index 19a51bf6b..37568d00c 100755 --- a/csharp/qrcode/encoder/Encoder.cs +++ b/csharp/qrcode/encoder/Encoder.cs @@ -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); } } -} \ No newline at end of file +}