1
2
3
4
5
6
7
8
9 package com.puppycrawl.tools.checkstyle.checks.coding.fallthrough;
10
11 public class InputFallThroughCharacterSwitch
12 {
13 void foo(char c, int i) {
14 while (true) {
15 switch (c) {
16 case 'a':
17 case 'b':
18 i++;
19 case 'c':
20 String.valueOf(i);
21 break;
22 case 'd':
23 return;
24 case 'e':
25 continue;
26 case 'f':
27 if (true) {
28 return;
29 }
30 case 'g':
31 try {
32 i++;
33 break;
34 } catch (RuntimeException e) {
35 } catch (Error e) {
36 return;
37 }
38 case 'h':
39 switch (i) {
40 case 1:
41 continue;
42 case 2:
43 i++;
44 case 3:
45 String.valueOf(i);
46 return;
47 }
48 case 'i':
49 switch (i) {
50 case 1:
51 continue;
52 case 2:
53 i++;
54 break;
55 case 3:
56 String.valueOf(i);
57 return;
58 }
59 break;
60 case 'A':
61 i++;
62
63 case 'B':
64 i++;
65
66 default:
67 i++;
68 break;
69 }
70 }
71 }
72 }