1 package org.checkstyle.suppressionxpathfilter.avoidnestedblocks; 2 3 public class InputXpathAvoidNestedBlocksAllowedInSwitchCase { 4 5 int s(int a) { 6 int x; 7 int y; 8 switch (a) { 9 case 0: 10 x = 1; 11 { // warn: statement outside block 12 y = -1; 13 break; 14 } 15 case 1: { // ok: allowInSwitchCase=true 16 x = 2; 17 y = -2; 18 break; 19 } 20 default: 21 x = 3; 22 y = -3; 23 } 24 return x + y; 25 } 26 }