1
2
3
4
5
6
7
8
9 package com.puppycrawl.tools.checkstyle.checks.whitespace.nowhitespaceafter;
10
11 import java.util.List;
12
13
14
15 public class InputNoWhitespaceAfterArrayDeclarations2
16 {
17
18 public class A {
19 public int[][] create(int i, int j) {
20 return new int[3] [3];
21 }
22 }
23
24 public class B {
25 public int create(int i, int j) [][] {
26 return new int [3][i + j] ;
27 }
28 }
29
30 public class C {
31 public int[][] create(int i, int j) {
32 return new int[i + j][i + j];
33 }
34 }
35
36 public class D {
37 public int[][] [] create(int i, int j) {
38 return new int [ i + j ] [ i + j ] [ 0 ] ;
39 }
40 }
41
42 public class E {
43 public int create(int i, int j, int [][] k)[] [][] {
44 int e [][] [] = new int[i + j] [2][i + j];
45 e [0] [1][2] = 0; e[1][1][1] = 0;
46 return e;
47 }
48 }
49 public static class F {
50 public static Integer [][][] create(int i, int j) {
51 int[][] [] f= new int[ 0][1 ][ 2 ] ;
52 return new Integer[i + j][i + j][0];
53 }
54 }
55 public class G {
56 public List<String> [] [] [] create(int i, int j) {
57
58
59
60 int g[][][] = new int [0][1][2];
61 g[ 0][0 ][ 0 ]=0;
62 g [0][0][0]=0;
63 g[0] [0][0]=0;
64 g [0] [0] [0] =0;
65 return null;
66 }
67
68 }
69 public class H {
70 public List<Integer> create(int i, int j) [] [][] {
71 return null;
72 }
73 }
74
75 Object someStuff4 = boolean [].class;
76 String[][] someStuff5 = new String[4][9];
77 String[][] someStuff6 = (java.lang.String [] []) someStuff5;
78 String[][] someStuff7 = (String [][]) someStuff5;
79
80
81 int someStuff8
82 [];
83
84
85 int[]
86 someStuff81;
87
88
89 Integer someStuff9[][][] = (Integer [][][]) F.create(1,2);
90
91
92 List<char[]> someStuff10;
93 List<char [][]> someStuff11;
94 List<InputNoWhitespaceAfterArrayDeclarations2.A []> someStuff12;
95 void foo(List<? extends String[]> bar, Comparable<? super Object []> baz) { }
96
97 Integer someStuff13 = F.create(1,1)[0][0][0];
98 Integer someStuff131 = F.create(1,1) [0][0] [0];
99 Object[] someStuff14 = (Object[]) null;
100 Object[] someStuff15 = (Object [] ) null;
101
102 byte someStuff16 = ((byte[]) someStuff4) [0];
103
104 public void bar() {
105 if(someStuff15 instanceof Object []) {
106
107 }
108 if(someStuff15 instanceof Object[] []) {
109
110 }
111 if(someStuff15 instanceof Object[][]) {
112
113 }
114 Object[] a = null;
115
116 if(a instanceof Object []) {
117
118 }
119 if(a instanceof Object[][]) {
120
121 }
122 }
123
124 }