1 /* 2 RightCurly 3 option = ALONE 4 tokens = LITERAL_IF, LITERAL_ELSE 5 6 7 */ 8 9 package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; 10 11 public class InputRightCurlyTestIfElseAlone { 12 13 public void test() { 14 int id = 0; 15 switch (id) { 16 case 0: break; 17 case 1: if (1 == 0) { 18 break; 19 }; // violation ''}' at column 12 should be alone on a line.' 20 case 2: break; 21 } 22 } 23 24 public void test2() { 25 if(true) { 26 27 } if(false) { // violation ''}' at column 9 should be alone on a line.' 28 29 } 30 } 31 32 }