View Javadoc
1   /*
2   WhitespaceAfter
3   tokens = LITERAL_SYNCHRONIZED
4   
5   
6   */
7   
8   package com.puppycrawl.tools.checkstyle.checks.whitespace.whitespaceafter;
9   
10  public class InputWhitespaceAfterLiteralSynchronized {
11  
12      public void check1() {
13          synchronized(this) { // violation ''synchronized' is not followed by whitespace'
14          }
15          try {
16          }
17          catch (RuntimeException e){
18          }
19      }
20  
21      public void check2() {
22          synchronized (this) { // ok
23          }
24          try {
25          }
26          catch (RuntimeException e){
27          }
28      }
29  
30      public void check3() {
31          synchronized(this) { } // violation ''synchronized' is not followed by whitespace'
32          synchronized (this) { }
33      }
34  }