1
2
3
4
5
6
7
8
9
10
11 package com.puppycrawl.tools.checkstyle.checks.blocks.avoidnestedblocks;
12
13 import static org.checkstyle.suppressionxpathfilter.interfaceistype.InputXpathInterfaceIsTypeAllowMarker.a;
14
15
16 public class Example2 {
17 public void foo() {
18 int myInteger = 0;
19 {
20 myInteger = 2;
21 }
22 System.out.println("myInteger = " + myInteger);
23
24 switch (a) {
25 case 1: {
26 System.out.println("Case 1");
27 break;
28 }
29 case 2:
30 System.out.println("Case 2");
31 break;
32 }
33 }
34 }
35