1   package com.puppycrawl.tools.checkstyle.checks.whitespace.nowhitespaceafter;
2   
3   public class InputNoWhitespaceAfterArrayDeclarations
4   {
5       Object[] someStuff = {}; //Correct
6       Object [] someStuff1 = {}; //Incorrect
7       Object someStuff2[] = {}; //Correct
8       Object someStuff3 [] = {}; //Incorrect
9       int [] a = {}; //Incorrect
10      String s [] = {}; //Incorrect
11      double d [] = {}; //Incorrect
12      char[] c = {}; //Correct
13      short sh[] = {}; //Correct
14      long[] l = {}; //Correct
15      byte b[] = {}; //Correct
16      int get() [] { //Incorrect
17          return a;}
18      int [] receive() { return a; } //Incorrect
19      int get1(int k, int c, int b) [] { //Incorrect
20          return null;
21      }
22      private String[] getLines() { //Correct
23          return new String[] { //Correct
24                  "s"
25          };
26      }
27      String aOptions[][]; //Correct
28      int [][][] abc; //Incorrect
29      int cba [][][]; //Incorrect
30      private String[][][] getSeveralLines() { //Correct
31          return new String [][][] { //Incorrect
32                  new String [][] { //Incorrect
33                          new String[] { //Correct
34                                  "s"
35                          }
36                  }
37          };
38      }
39      int ar [] = new int [] {1, 2}; //Incorrect (2 warnings)
40      private int [][][] getMultiArray() { //Incorrect
41          return null;
42      }
43      private long getLongMultiArray(int someParam, String value) [][][] { //Incorrect
44          return null;
45      }
46      int aa = new int[]{1}[0];//Correct
47      int bb = new int[]{1} [0];//Incorrect
48      int aaa = new int[][]{{1},{2}}[0][0];//Correct
49      int bbb = new int [][]{{1},{2}}[0][0];//Incorrect
50      int ccc = new int[] []{{1},{2}}[0][0];//Incorrect
51      int ddd = new int[][]{{1},{2}} [0][0];//Incorrect
52      int eee = new int[][]{{1},{2}}[0] [0];//Incorrect
53      int in1 = new int[][]{{1},{2}}[ 0][0];//Correct
54      int in2 = new int[][]{{1},{2}}[0 ][0];//Correct
55      int in3 = new int[][]{{1},{2}}[0][ 0];//Correct
56      int in4 = new int[][]{{1},{2}}[0][0 ];//Correct
57  }