View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;
2   
3   import java.lang.annotation.ElementType;
4   import java.lang.annotation.Target;
5   import java.util.ArrayList;
6   import java.util.List;
7   
8   class InputRightCurlyLineBreakBefore
9   {
10      /** @see test method **/
11      int foo() throws InterruptedException
12      {
13          int x = 1;
14          int a = 2;
15          while (true)
16          {
17              try
18              {
19                  if (x > 0)
20                  {
21                      break;
22                  } else if (x < 0) {
23                      ;
24                  } else { break; }
25                  switch (a)
26                  {
27                  case 0:
28                      break;
29                  default:
30                      break;
31                  }
32              } catch (Exception e) { break; } finally { break; }
33          }
34  
35          synchronized (this) { do { x = 2; } while (x == 2); }
36          
37          synchronized (this) {
38              do {} while (x == 2);
39          }
40  
41          for (int k = 0; k < 1; k++) { String innerBlockVariable = ""; }
42  
43          for (int k = 0; k < 1; k++) {}
44  		return a;
45      }
46  
47      static { int x = 1; }
48  
49      void method2()
50      {
51          boolean flag = false;
52          if (flag) { String.valueOf("foo"); }
53      }
54  }
55  
56  class Absent_CustomFieldSerializer {
57  
58      public static void serialize() {} 
59  }
60  
61  class Absent_CustomFieldSerializer10
62  {
63      public Absent_CustomFieldSerializer10() {}
64  }
65  
66  class EmptyClass {}
67  
68  interface EmptyInterface {}