projects
/
zxing.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b53df49
)
Standardize array initializer syntax to use the form without "new type[]", to be...
author
srowen
<srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Mon, 7 Apr 2008 19:42:35 +0000
(19:42 +0000)
committer
srowen
<srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Mon, 7 Apr 2008 19:42:35 +0000
(19:42 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@348
59b500cc
-1b3d-0410-9834-
0bbf25fbcc57
core/src/com/google/zxing/client/result/NDEFURIParsedResult.java
patch
|
blob
|
history
core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java
patch
|
blob
|
history
core/src/com/google/zxing/qrcode/decoder/DataMask.java
patch
|
blob
|
history
core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java
patch
|
blob
|
history
core/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java
patch
|
blob
|
history
core/src/com/google/zxing/qrcode/decoder/FormatInformation.java
patch
|
blob
|
history
core/src/com/google/zxing/qrcode/decoder/Version.java
patch
|
blob
|
history
core/test/src/com/google/zxing/common/BitSourceTestCase.java
patch
|
blob
|
history
core/test/src/com/google/zxing/common/PerspectiveTransformTestCase.java
patch
|
blob
|
history
core/test/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParserTestCase.java
patch
|
blob
|
history
diff --git
a/core/src/com/google/zxing/client/result/NDEFURIParsedResult.java
b/core/src/com/google/zxing/client/result/NDEFURIParsedResult.java
index
bb6d985
..
df64ac6
100644
(file)
--- a/
core/src/com/google/zxing/client/result/NDEFURIParsedResult.java
+++ b/
core/src/com/google/zxing/client/result/NDEFURIParsedResult.java
@@
-26,7
+26,7
@@
import com.google.zxing.Result;
*/
public final class NDEFURIParsedResult extends AbstractNDEFParsedResult {
*/
public final class NDEFURIParsedResult extends AbstractNDEFParsedResult {
- private static final String[] URI_PREFIXES =
new String[]
{
+ private static final String[] URI_PREFIXES = {
null,
"http://www.",
"https://www.",
null,
"http://www.",
"https://www.",
diff --git
a/core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java
b/core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java
index
09dcebe
..
ea68b65
100644
(file)
--- a/
core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java
+++ b/
core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java
@@
-33,13
+33,13
@@
final class DecodedBitStreamParser {
* See ISO 16022:2006, Annex C Table C.1
* The C40 Basic Character Set (*'s used for placeholders for the shift values)
*/
* See ISO 16022:2006, Annex C Table C.1
* The C40 Basic Character Set (*'s used for placeholders for the shift values)
*/
- private static final char[] C40_BASIC_SET_CHARS =
new char[]
{
+ private static final char[] C40_BASIC_SET_CHARS = {
'*', '*', '*', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
};
'*', '*', '*', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
};
- private static final char[] C40_SHIFT2_SET_CHARS =
new char[]
{
+ private static final char[] C40_SHIFT2_SET_CHARS = {
'!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.',
'/', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_'
};
'!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.',
'/', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_'
};
@@
-48,13
+48,13
@@
final class DecodedBitStreamParser {
* See ISO 16022:2006, Annex C Table C.2
* The Text Basic Character Set (*'s used for placeholders for the shift values)
*/
* See ISO 16022:2006, Annex C Table C.2
* The Text Basic Character Set (*'s used for placeholders for the shift values)
*/
- private static final char[] TEXT_BASIC_SET_CHARS =
new char[]
{
+ private static final char[] TEXT_BASIC_SET_CHARS = {
'*', '*', '*', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
};
'*', '*', '*', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
};
- private static final char[] TEXT_SHIFT3_SET_CHARS =
new char[]
{
+ private static final char[] TEXT_SHIFT3_SET_CHARS = {
'\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', 127
};
'\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', 127
};
diff --git
a/core/src/com/google/zxing/qrcode/decoder/DataMask.java
b/core/src/com/google/zxing/qrcode/decoder/DataMask.java
index
d55a086
..
e55ff1f
100755
(executable)
--- a/
core/src/com/google/zxing/qrcode/decoder/DataMask.java
+++ b/
core/src/com/google/zxing/qrcode/decoder/DataMask.java
@@
-32,7
+32,7
@@
abstract class DataMask {
/**
\r
* See ISO 18004:2006 6.8.1
\r
*/
\r
/**
\r
* See ISO 18004:2006 6.8.1
\r
*/
\r
- private static final DataMask[] DATA_MASKS =
new DataMask[]
{
\r
+ private static final DataMask[] DATA_MASKS = {
\r
new DataMask000(),
\r
new DataMask001(),
\r
new DataMask010(),
\r
new DataMask000(),
\r
new DataMask001(),
\r
new DataMask010(),
\r
diff --git
a/core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java
b/core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java
index
712a0cb
..
b53a7cf
100644
(file)
--- a/
core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java
+++ b/
core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java
@@
-34,7
+34,7
@@
final class DecodedBitStreamParser {
/**
* See ISO 18004:2006, 6.4.4 Table 5
*/
/**
* See ISO 18004:2006, 6.4.4 Table 5
*/
- private static final char[] ALPHANUMERIC_CHARS =
new char[]
{
+ private static final char[] ALPHANUMERIC_CHARS = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
diff --git
a/core/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java
b/core/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java
index
0e83d58
..
3d1f2d0
100644
(file)
--- a/
core/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java
+++ b/
core/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java
@@
-45,7
+45,7
@@
final class ErrorCorrectionLevel {
*/
static final ErrorCorrectionLevel H = new ErrorCorrectionLevel(3);
*/
static final ErrorCorrectionLevel H = new ErrorCorrectionLevel(3);
- private static final ErrorCorrectionLevel[] FOR_BITS =
new ErrorCorrectionLevel[]
{M, L, H, Q};
+ private static final ErrorCorrectionLevel[] FOR_BITS = {M, L, H, Q};
private final int ordinal;
private final int ordinal;
diff --git
a/core/src/com/google/zxing/qrcode/decoder/FormatInformation.java
b/core/src/com/google/zxing/qrcode/decoder/FormatInformation.java
index
2234746
..
c257f09
100644
(file)
--- a/
core/src/com/google/zxing/qrcode/decoder/FormatInformation.java
+++ b/
core/src/com/google/zxing/qrcode/decoder/FormatInformation.java
@@
-33,7
+33,7
@@
final class FormatInformation {
/**
* See ISO 18004:2006, Annex C, Table C.1
*/
/**
* See ISO 18004:2006, Annex C, Table C.1
*/
- private static final int[][] FORMAT_INFO_DECODE_LOOKUP =
new int[][]
{
+ private static final int[][] FORMAT_INFO_DECODE_LOOKUP = {
{0x5412, 0x00},
{0x5125, 0x01},
{0x5E7C, 0x02},
{0x5412, 0x00},
{0x5125, 0x01},
{0x5E7C, 0x02},
diff --git
a/core/src/com/google/zxing/qrcode/decoder/Version.java
b/core/src/com/google/zxing/qrcode/decoder/Version.java
index
d30fdeb
..
f5abfec
100755
(executable)
--- a/
core/src/com/google/zxing/qrcode/decoder/Version.java
+++ b/
core/src/com/google/zxing/qrcode/decoder/Version.java
@@
-30,7
+30,7
@@
public final class Version {
* See ISO 18004:2006 Annex D.
\r
* Element i represents the raw version bits that specify version i + 7
\r
*/
\r
* See ISO 18004:2006 Annex D.
\r
* Element i represents the raw version bits that specify version i + 7
\r
*/
\r
- private static final int[] VERSION_DECODE_INFO =
new int[]
{
\r
+ private static final int[] VERSION_DECODE_INFO = {
\r
0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6,
\r
0x0C762, 0x0D847, 0x0E60D, 0x0F928, 0x10B78,
\r
0x1145D, 0x12A17, 0x13532, 0x149A6, 0x15683,
\r
0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6,
\r
0x0C762, 0x0D847, 0x0E60D, 0x0F928, 0x10B78,
\r
0x1145D, 0x12A17, 0x13532, 0x149A6, 0x15683,
\r
diff --git
a/core/test/src/com/google/zxing/common/BitSourceTestCase.java
b/core/test/src/com/google/zxing/common/BitSourceTestCase.java
index
3f61831
..
180385a
100644
(file)
--- a/
core/test/src/com/google/zxing/common/BitSourceTestCase.java
+++ b/
core/test/src/com/google/zxing/common/BitSourceTestCase.java
@@
-24,7
+24,7
@@
import junit.framework.TestCase;
public final class BitSourceTestCase extends TestCase {
public void testSource() {
public final class BitSourceTestCase extends TestCase {
public void testSource() {
- byte[] bytes =
new byte[]
{(byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5};
+ byte[] bytes = {(byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5};
BitSource source = new BitSource(bytes);
assertEquals(40, source.available());
assertEquals(0, source.readBits(1));
BitSource source = new BitSource(bytes);
assertEquals(40, source.available());
assertEquals(0, source.readBits(1));
diff --git
a/core/test/src/com/google/zxing/common/PerspectiveTransformTestCase.java
b/core/test/src/com/google/zxing/common/PerspectiveTransformTestCase.java
index
5b5834d
..
19bc809
100644
(file)
--- a/
core/test/src/com/google/zxing/common/PerspectiveTransformTestCase.java
+++ b/
core/test/src/com/google/zxing/common/PerspectiveTransformTestCase.java
@@
-49,7
+49,7
@@
public final class PerspectiveTransformTestCase extends TestCase {
}
private static void assertPointEquals(float expectedX, float expectedY, float sourceX, float sourceY, PerspectiveTransform pt) {
}
private static void assertPointEquals(float expectedX, float expectedY, float sourceX, float sourceY, PerspectiveTransform pt) {
- float[] points =
new float[]
{sourceX, sourceY};
+ float[] points = {sourceX, sourceY};
pt.transformPoints(points);
assertEquals(expectedX, points[0], EPSILON);
assertEquals(expectedY, points[1], EPSILON);
pt.transformPoints(points);
assertEquals(expectedX, points[0], EPSILON);
assertEquals(expectedY, points[1], EPSILON);
diff --git
a/core/test/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParserTestCase.java
b/core/test/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParserTestCase.java
index
dd3380a
..
a4d6273
100644
(file)
--- a/
core/test/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParserTestCase.java
+++ b/
core/test/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParserTestCase.java
@@
-27,16
+27,16
@@
public final class DecodedBitStreamParserTestCase extends TestCase{
public void testAsciiStandardDecode() throws ReaderException {
// ASCII characters 0-127 are encoded as the value + 1
public void testAsciiStandardDecode() throws ReaderException {
// ASCII characters 0-127 are encoded as the value + 1
- byte[] bytes =
new byte[]
{(byte) ('a' + 1), (byte) ('b' + 1), (byte) ('c' + 1),
-
(byte) ('A' + 1), (byte) ('B' + 1), (byte) ('C' + 1)};
+ byte[] bytes = {(byte) ('a' + 1), (byte) ('b' + 1), (byte) ('c' + 1),
+ (byte) ('A' + 1), (byte) ('B' + 1), (byte) ('C' + 1)};
String decodedString = DecodedBitStreamParser.decode(bytes);
assertEquals("abcABC", decodedString);
}
public void testAsciiDoubleDigitDecode() throws ReaderException{
// ASCII double digit (00 - 99) Numeric Value + 130
String decodedString = DecodedBitStreamParser.decode(bytes);
assertEquals("abcABC", decodedString);
}
public void testAsciiDoubleDigitDecode() throws ReaderException{
// ASCII double digit (00 - 99) Numeric Value + 130
- byte[] bytes =
new byte[]{(byte) (00 + 130), (byte) (0
1 + 130),
-
(byte) (98 + 130), (byte) (99 + 130)};
+ byte[] bytes =
{(byte) 130 , (byte) (
1 + 130),
+ (byte) (98 + 130), (byte) (99 + 130)};
String decodedString = DecodedBitStreamParser.decode(bytes);
assertEquals("00019899", decodedString);
}
String decodedString = DecodedBitStreamParser.decode(bytes);
assertEquals("00019899", decodedString);
}