aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks
diff options
context:
space:
mode:
authorRuslan Iagudin <ruslan_iagudin@epam.com>2017-08-30 11:52:53 +0300
committerVladislav Lisetskii <vladlis54@gmail.com>2017-08-31 20:07:44 +0300
commit518e639d1742c16330c1529b91b6fbbb317998a2 (patch)
tree40b8a92171f9cc7b25092736c5f6dc8fd27a5820 /src/test/resources/com/puppycrawl/tools/checkstyle/checks
parent07a730c0d1b89593e17fa8920faf9c226200e7b5 (diff)
downloadcheckstyle-518e639d1742c16330c1529b91b6fbbb317998a2.tar.gz
Issue #4557: fixed NPE in NoWhitespaceAfterCheck
Diffstat (limited to 'src/test/resources/com/puppycrawl/tools/checkstyle/checks')
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/InputNoWhitespaceAfterArrayDeclarations.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/InputNoWhitespaceAfterArrayDeclarations.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/InputNoWhitespaceAfterArrayDeclarations.java
index e1fdeef74..9ba53befb 100644
--- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/InputNoWhitespaceAfterArrayDeclarations.java
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespaceafter/InputNoWhitespaceAfterArrayDeclarations.java
@@ -43,4 +43,15 @@ public class InputNoWhitespaceAfterArrayDeclarations
private long getLongMultArray(int someParam, String value) [][][] { //Incorrect
return null;
}
+ int aa = new int[]{1}[0];//Correct
+ int bb = new int[]{1} [0];//Incorrect
+ int aaa = new int[][]{{1},{2}}[0][0];//Correct
+ int bbb = new int [][]{{1},{2}}[0][0];//Incorrect
+ int ccc = new int[] []{{1},{2}}[0][0];//Incorrect
+ int ddd = new int[][]{{1},{2}} [0][0];//Incorrect
+ int eee = new int[][]{{1},{2}}[0] [0];//Incorrect
+ int in1 = new int[][]{{1},{2}}[ 0][0];//Correct
+ int in2 = new int[][]{{1},{2}}[0 ][0];//Correct
+ int in3 = new int[][]{{1},{2}}[0][ 0];//Correct
+ int in4 = new int[][]{{1},{2}}[0][0 ];//Correct
}