View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.coding.fallthrough;
2   
3   public class InputFallThrough2 {
4       enum Test {
5           A, B, C
6       }
7   
8       public static void test() {
9           Test test = Test.A;
10          int variable = 0;
11  
12          switch (test) {
13              case A:
14                  break;
15              case B:
16                  if (variable == 1) {
17                      // some work
18                      break;
19                  }
20              case C:
21                  break;
22          }
23  
24          int var2 = 1;
25          switch (variable) {
26              case 0:
27              case 1:
28              case 2:
29                  System.identityHashCode(var2);
30                  break;
31              case 3:
32                  if (true) {
33                      return;
34                  }
35              case 4:
36                  if (var2 == 2) {
37                      break;
38                  }
39              case 5:
40                  if (var2 == 1) {
41  
42                  }
43                  else if (true) {
44                      return;
45                  }
46              case 6:
47                  if (var2 > 1) {
48                      break;
49                  }
50                  else {
51                      break;
52                  }
53              case 7:
54                  if (var2 ==1) {
55                      break;
56                  }
57                  else if (true) {
58                      return;
59                  }
60              case 8:
61                  if(var2 == 5) {
62                      System.identityHashCode("0xB16B00B5");
63                  }
64                  else {
65                      break;
66                  }
67              case 9:
68                  if(var2 == 5) {
69                      System.identityHashCode("0xCAFED00D");
70                  }
71                  else {
72                      String.CASE_INSENSITIVE_ORDER.equals("0x4B1D");
73                  }
74                  break;
75              case 10:
76                  int var3 = 0xDEADBEEF;
77                  switch (var3) {
78                      case 0xCAFEBABE:
79                          String.CASE_INSENSITIVE_ORDER.equals("0x1CEB00DA");
80                      default:
81                          String.CASE_INSENSITIVE_ORDER.equals("");
82                  }
83                  if(true) {
84                      break;
85                  }
86              case 11:
87                  if(false) {break;}
88              case 12:
89                  if(true);
90                  break;
91              default:
92                  break;
93          }
94      }
95  }