View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.descendanttoken;
2   
3   public class InputDescendantTokenMissingSwitchDefault {
4       public void foo() {
5           int i = 1;
6           switch (i) {
7           case 1: i++; break;
8           case 2: i--; break;
9           default: return;
10          }
11      }
12  }
13  
14  class bad_test {
15      public void foo() {
16          int i = 1;
17          switch (i) {
18          case 1: i++; break;
19          case 2: i--; break;
20          }
21      }
22  }