View Javadoc
1   /*
2   DescendantToken
3   limitedTokens = LITERAL_DEFAULT
4   minimumDepth = (default)0
5   maximumDepth = (default)2147483647
6   minimumNumber = 2
7   maximumNumber = (default)2147483647
8   sumTokenCounts = (default)false
9   minimumMessage = (default)null
10  maximumMessage = (default)null
11  tokens = LITERAL_SWITCH
12  
13  
14  */
15  
16  package com.puppycrawl.tools.checkstyle.checks.descendanttoken;
17  
18  public class InputDescendantTokenIllegalTokens4
19  {
20      public void methodWithPreviouslyIllegalTokens()
21      {
22          int i = 0;
23          // violation below 'Count of 1 for '.*_SWITCH' descendant '.*_DEFAULT' is less than .* 2.'
24          switch (i)
25          {
26              default:
27                  i--;
28                  i++;
29                  break;
30          }
31      }
32  
33      public native void nativeMethod();
34  }