Standardize array initializer syntax to use the form without "new type[]", to be...
authorsrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Mon, 7 Apr 2008 19:42:35 +0000 (19:42 +0000)
committersrowen <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
core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java
core/src/com/google/zxing/qrcode/decoder/DataMask.java
core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java
core/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java
core/src/com/google/zxing/qrcode/decoder/FormatInformation.java
core/src/com/google/zxing/qrcode/decoder/Version.java
core/test/src/com/google/zxing/common/BitSourceTestCase.java
core/test/src/com/google/zxing/common/PerspectiveTransformTestCase.java
core/test/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParserTestCase.java

index bb6d985..df64ac6 100644 (file)
@@ -26,7 +26,7 @@ import com.google.zxing.Result;
  */
 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.",
index 09dcebe..ea68b65 100644 (file)
@@ -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)
    */
-  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'
   };
   
-  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)
    */
-  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'
   };
   
-  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
   };
index d55a086..e55ff1f 100755 (executable)
@@ -32,7 +32,7 @@ abstract class DataMask {
   /**\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
index 712a0cb..b53a7cf 100644 (file)
@@ -34,7 +34,7 @@ final class DecodedBitStreamParser {
   /**
    * 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',
index 0e83d58..3d1f2d0 100644 (file)
@@ -45,7 +45,7 @@ final class ErrorCorrectionLevel {
    */
   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;
 
index 2234746..c257f09 100644 (file)
@@ -33,7 +33,7 @@ final class FormatInformation {
   /**
    * 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},
index d30fdeb..f5abfec 100755 (executable)
@@ -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
-  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
index 3f61831..180385a 100644 (file)
@@ -24,7 +24,7 @@ import junit.framework.TestCase;
 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));
index 5b5834d..19bc809 100644 (file)
@@ -49,7 +49,7 @@ public final class PerspectiveTransformTestCase extends TestCase {
   }
 
   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);
index dd3380a..a4d6273 100644 (file)
@@ -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
-    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
-    byte[] bytes = new byte[]{(byte) (00 + 130), (byte) (01 + 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);
   }