1
2
3
4
5
6
7
8
9 package com.puppycrawl.tools.checkstyle.checks.coding.fallthrough;
10
11 public class InputFallThrough4 {
12 void methodFallThru(int i, int j) {
13 while (true) {
14 switch (i) {
15 case -1:
16 case 0:
17 case 26:
18 switch (j) {
19 case 1:
20 continue;
21 case 2:
22 break;
23 default:
24 return;
25 }
26
27 default:
28
29 i++;
30
31 }
32 }
33 }
34
35 void methodFallThruCC(int i, int j) {
36 while (true) {
37 switch (i){
38 case 5:
39 i++;
40
41 }
42 }
43 }
44
45 void methodFall(int i, int j) {
46 while (true) {
47 switch (i){
48 case 5:
49 i++;
50 }
51 }
52 }
53
54 void method(int i, int j) {
55 while (true) {
56 switch (i){
57 case 2: {
58 i++;
59 }
60
61 case 3:
62 i++;
63 case 4:
64 break;
65 case 5:
66 i++;
67
68 }
69 }
70 }
71
72 void method2(int i, int j) {
73 while (true) {
74 switch (i){
75 case 2: {
76 i++;
77 }
78
79 case 3:
80 i++;
81 case 4:
82 break;
83 case 5:
84 i++;
85 }
86 }
87 }
88
89 void method3(int i, int j, boolean cond) {
90 while (true) {
91 switch (i){
92 case 5:
93 i++;
94
95 }
96 }
97 }
98
99 void method4(int i, int j, boolean cond) {
100 while (true) {
101 switch (i){
102 case 5:
103 i++;
104
105 }
106 }
107 }
108
109 void method5(int i, int j, boolean cond) {
110 while (true) {
111 switch (i){
112 case 5:
113 i++;
114
115 }
116 }
117 }
118 }