1
2
3
4
5
6
7
8
9
10 package com.puppycrawl.tools.checkstyle.checks.blocks.emptyblock;
11
12 import java.io.*;
13 import java.awt.Dimension;
14 import java.awt.Color;
15
16 class InputEmptyBlockSemantic2Statement
17 {
18 public void fooMethod()
19 {
20 int a = 1;
21 if (a == 1) {}
22 char[] s = {'1', '2'};
23 int index = 2;
24 if (doSideEffect() == 1) {}
25 while ((a = index - 1) != 0) {}
26 for (; index < s.length && s[index] != 'x'; index++) {}
27 if (a == 1) {} else {a++;}
28 switch (a) {}
29 switch (a) {
30 case 1:
31 a = 2;
32 case 2:
33 a = 3;
34 default:
35 a = 0;
36 }
37 }
38
39 public int doSideEffect()
40 {
41 return 1;
42 }
43 }