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