View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.coding.returncount;
2   /* комментарий на русском */
3   public class InputReturnCountSwitches
4   {
5       public boolean equals(Object obj) {
6           int i = 1;
7           switch (i) {
8           case 1: return true;
9           case 2: return true;
10          case 3: return true;
11          case 4: return true;
12          case 5: return true;
13          case 6: return true;
14          }
15          return false;
16      }
17  
18      void foo(int i) {
19          switch (i) {
20          case 1: return;
21          case 2: return;
22          case 3: return;
23          case 4: return;
24          case 5: return;
25          case 6: return;
26          }
27          return;
28      }
29  
30      void foo1(int i) {
31          if (i == 1) {
32              return;
33          }
34          Object obj = new Object() {
35                  void method1(int i) {
36                      switch (i) {
37                      case 1: return;
38                      case 2: return;
39                      case 3: return;
40                      case 4: return;
41                      case 5: return;
42                      }
43                      return;
44                  }
45              };
46          return;
47      }
48  
49      public boolean foo2() {
50          int i = 1;
51          switch (i) {
52          case 1: return true;
53          case 2: return true;
54          case 3: return true;
55          case 4: return true;
56          case 5: return true;
57          case 6: return true;
58          }
59          return false;
60      }
61  }
62  
63  class Test {
64  
65      public Test() {}
66  }