1 package com.google.checkstyle.test.chapter4formatting.rule412nonemptyblocks;
2
3
4 public class InputFormattedRightCurlySwitchCase {
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
19 public static void method1() {
20 int mode = 0;
21 switch (mode) {
22 default:
23 int x = 0;
24 }
25 }
26
27
28 public static void method2() {
29 int mode = 0;
30 switch (mode) {
31 case 1:
32 int x = 1;
33 break;
34 default:
35 x = 0;
36 }
37 }
38
39
40 public static void method3() {
41 int mode = 0;
42 switch (mode) {
43 default:
44 int x = 0;
45 }
46 }
47
48
49 public static void method4() {
50 int mode = 0;
51 switch (mode) {
52 case 1:
53 int y = 2;
54 break;
55 default:
56 int x = 0;
57 }
58 }
59 }