1 package com.google.checkstyle.test.chapter4formatting.rule412nonemptyblocks;
2
3
4 public class InputRightCurlySwitchCase {
5
6
7 public static void method0() {
8 int mode = 0;
9 switch (mode) {
10 case 1:
11 int x = 1;
12 break;
13 default:
14 x = 0; }
15 }
16
17
18 public static void method1() {
19 int mode = 0;
20 switch (mode) {
21 default:
22 int x = 0; }
23 }
24
25
26 public static void method2() {
27 int mode = 0;
28 switch (mode) {
29 case 1:
30 int x = 1;
31 break;
32 default:
33 x = 0;
34 }
35 }
36
37
38 public static void method3() {
39 int mode = 0;
40 switch (mode) {
41 default:
42 int x = 0;
43 }
44 }
45
46
47 public static void method4() {
48 int mode = 0;
49 switch (mode) {
50 case 1:
51 int y = 2;
52 break;
53 default:
54 int x = 0;
55 }
56 }
57 }