View Javadoc
1   /*
2   NeedBraces
3   allowSingleLineStatement = true
4   allowEmptyLoopBody = (default)false
5   tokens = LITERAL_CASE, LITERAL_DEFAULT
6   
7   
8   */
9   
10  package com.puppycrawl.tools.checkstyle.checks.blocks.needbraces;
11  
12  public class InputNeedBracesTestSingleLineCaseDefault2 {
13      int value;
14      private void main() {
15          switch (value) {
16              default:
17          }
18      }
19      private void main1() {
20          switch (value) {
21              case 1:
22          }
23      }
24  }
25  
26  @interface Example {
27      String priority() default "value";
28  }
29  
30  interface IntefaceWithDefaultMethod {
31      default void doIt(){}
32  }