1   package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;
2   /**
3     * This test-input is intended to be checked using following configuration:
4     *
5     * option = EOL
6     *
7     */
8   public class InputLeftCurlyEolSwitch {
9   
10      public void doStuff() {
11          int x = 1;
12          switch (x) {
13              case 0:
14              { // warn
15                  break;
16              }
17              case (1+0):
18              { // warn
19                  break;
20              }
21              case 2: {
22                  break;
23              }
24              default:
25              { // warn
26                  break;
27              }
28              case 3:
29              case 4:
30                  x++;
31                  { // OK, standalone block
32                  }
33                  break;
34              case 5: {
35                  }
36                  break;
37              case (5
38                  +1):
39              { // warn
40                  break;
41              }
42              case 7
43                  :
44              { // warn
45                  break;
46              }
47          }
48          switch (x) {
49              case 0: {
50                  break;
51              }
52              default:
53                  // do nothing
54          }
55      }
56  
57      public @interface SomeAnnotation {
58  
59          String value() default "";
60  
61      }
62  
63      public interface SomeInterface {
64  
65          default String method() {
66              return null;
67          }
68      }
69  
70  }